You might need to press and hold some shortcuts slightly longer than others. This helps you to avoid using them unintentionally.
power
Put your Mac to sleep.
option–command–power* or
option–command–eject
Put your displays to sleep.
control–shift–power* or
control–shift–eject
Display a dialog asking whether you want to restart, sleep, or shut down.
control–power* or
control–eject
Force your Mac to restart, without prompting to save any open and unsaved documents.
control–command–power*
Quit all apps, then restart your Mac. If any open documents have unsaved changes, you will be asked whether you want to save them.
control–command–eject
Quit all apps, then shut down your Mac. If any open documents have unsaved changes, you will be asked whether you want to save them.
control–option–command–power* or
control–option–command–eject
Immediately lock your screen.
control-command-q
Log out of your macOS user account. You will be asked to confirm. To log out immediately without confirming, press Option-Shift-Command-Q.