Press & hold the power button to see if you can force the laptop to power off in case it got stuck during shutdown.
Try booting into Safe Mode and perform a Shutdown. Does this actually allow the laptop to fully power off including the Caps Lock LED? If so, then you likely have some third party software installed which is interfering with the normal operation of macOS.
If it is an Intel Mac, then try an SMC Reset (read the instructions since it varies by machine) and a PRAM Reset (hold the PRAM Reset for at least two chime if possible).
If it is a 2018+ model, then maybe try a "Revive" or "Restore" (the latter destroys all data on the internal SSD and is the option most likely to work if anything will work):
Revive or restore an Intel-based Mac using Apple Configurator - Apple Support
Revive or restore a Mac with Apple silicon using Apple Configurator - Apple Support
Otherwise, it would appear the laptop has some sort of hardware issue which will need to be repaired