Some app preventing it.
This is a hierarchical test strategy; it’s important that a prior test fails before the later tests will tell anything useful. So don’t jump ahead.
1. Ensure everything is up to date. Then boot up, log in, and immediately shut down without opening any apps. If that’s working okay works, it’s some app you open later; experiment until you figure out which one.
2. If it still hangs with that test, try booting into Safe Mode, then immediately shut down - if that works, it’s definitely something loading on boot. Check Login Items, and… well, it gets a bit complicated from there so let us know if this is the path you’re on and we can provide more detail.
3. If it’s the same in Safe Mode, create a new user account - reboot - and log into the new user, and shut down. If that’s working okay, it’s something in the original user account and… again with the “it’s complicated “ so just let us know 😉 I’m typing on an iPad and this is getting long already.