Sometimes a simple reset of the System Management Controller (SMC) and NVRAM (a small amount of memory that your Mac uses to store certain settings and access them quickly) can easily resolve many unexplained issues you may be experiencing with your Mac.
Please note: On Macs utilizing Apple SIllicon (M1, M2 series at the time of this article) runs a check on the NVRAM & resets if necessary, meaning this process is no longer accurate for Apple Silicon chipsets. Macs utilizing the Apple Sillicon chipsets also have an System Management Controller (SMC) anymore. The functions that the SMC handled are now taken care of by the chipset itself, meaning you no longer need to perform a specific reset, simply power down your Mac & leave it off for 30 seconds before powering it back on - this will reset the chipset.
Read all steps start to finish first so that you have an idea of the various keys you'll be pressing down and the timing of each step -- and then follow each step in order:
1. Shut down the computer. You may have to do perform a hard power-off by holding the power button down until the computer shuts off.
2. Unplug the power from the back of the computer and unplug any other peripheral devices plugged into the computer (keyboard, mouse, headphones, USB devices, external display)
3. Press and hold the power button down for 5 seconds then release the power button
4. Reattach the power cable, and plug in the USB-based keyboard and mouse, or ensure that the keyboard and mouse are switched on if they are Bluetooth-based
5. Press the power button and then immediately hold down these four keys together on the keyboard: Option, Command, P, and R. Keep holding the keys for about 20 seconds, during which the computer might appear to restart. Continue to hold those keys down and then release them only after you hear the startup chime two times.
6. Verify successful boot to the MacOS login screen and ensure you can log into your account
7. Reconnect any remaining peripheral devices