Resetting the system management controller (SMC) can resolve certain issues related to power, battery, fans, and other features.
Instructions: https://support.apple.com/en-us/HT201295
Reset NVRAM or PRAM
NVRAM (nonvolatile random-access memory) is a small amount of memory that your Mac uses to store certain settings and access them quickly.
PRAM (Parameter RAM) stores similar information, and the steps for resetting NVRAM and PRAM are the same.
If your Mac has issues related to settings stored in NVRAM or PRAM, resetting it might help.
INstructions: https://support.apple.com/en-us/HT204063