You should always lock your Android when you are not using it. Locking it prevents others from viewing or using it without your permission and turns off the screen to save battery life. You’ll still get notifications and alarms.
It’s easy to lock your phone. Just press the Power button briefly. Your screen will turn off (or change to the always-on display) and your data will be safe in case of loss or theft.
You can wake your device to the lock screen by tapping the screen or pressing the Power button. From the lock screen, use your fingerprint, PIN, or other mode to unlock your phone.
Some devices have the option to display the time and date on the lock screen and whatever notification options you have selected (email notifications for instance), when you tap the screen or lift the phone. On the Pixel, you can set these options in Settings > Display > lock screen. Samsung, look for Settings > Lift to wake or Settings > Advanced features > Motions and gestures.