Hold down Ctrl + Opt + Cmd. Now press the Power button. macOS should attempt to close any open apps and to turn off your Mac.

Hold down Ctrl + Opt + Cmd. Now press the Power button. macOS should attempt to close any open apps and to turn off your Mac.