The SMC or System Management Controller, is responsible for controlling the power button, battery, temperature control of internal components, keyboard backlight, video sources, fan speed, and various status indicators. If your Mac doesn’t respond when you press the power button even if it’s plugged in, shuts down unexpectedly or is generally running slowly, you can try reset the SMC.
For MacBook Pro and MacBook Air models released in 2018 or later with T2 chip
First shut down your Mac, then on your keyboard hold down:
Left Control, Left Option, Right Shift, and the Power Button
Hold these down for 7 seconds.
Release all the keys, then press the power button again to start your Mac as normal.
For MacBook Pro models released mid-2009 to 2017 and MacBook Air models released in 2017 or earlier
First shut down your Mac, then on your keyboard hold down:
Left Shift, Left Control, Left Option and the Power Button
Hold these at the same time for 10 seconds.
Release all the keys, then press the power button again to start your Mac as normal.
For iMac, Mac Pro and Mac Mini
First shut down your Mac
Disconnect the power cable
Press and hold the power button for 5 seconds
Release the button
Reattach the power cables and start Mac as usual