How to put the Mac Mini to sleep (without logging in) when the screen is locked?
I disconnect the display in this case for sleep if I can't remember the shortcuts that I don't use often.

https://support.apple.com/en-us/HT201236



Option–Command–Power button* or Option–Command–Media Eject : Put your Mac to sleep.
Control–Shift–Power button* or Control–Shift–Media Eject : Put your displays to sleep.


For shut down, you can also log in - either via screen sharing, ssh, Apple a Remote Desktop or remote scripts if you need to sleep or power off the display and haven't memorized the commands above.