Shut down
Disconnect all external devices
reset the smc
https://support.apple.com/en-us/HT201295
reset the NVRAM
How to reset NVRAM on your Mac - Apple Support
then boot into safe mode
https://support.apple.com/en-us/HT201262
then reboot normally with devices disconnected.