Macbook pro wont update format or shut down and hangs everytime
Even if you have an SSD MacBook Pro, I would immediately make a backup at the first signs of stalling. It’s almost always software and the fastest way to test that is to reboot to recovery, erase your Mac and then install a clean, new OS from internet. You will know immediately that the OS is clean and fast and then can move files back with Migration Assistant.

You need to trust your backup / restore though. You can also mess around with trying to eliminate things like user settings by making a new user account - see if it freezes, uninstall all old kernel extension and intrusive apps like AntiVirus or other things like Adobe that are heavy handed, but that takes a lot of time and most people have dozens to a hundred apps to triage that way. Much more efficient to just test a new user account, reboot and erase in my experience.

Also, it could be the storage failing, which also means it’s much better to get your backup solid - so good you know you can use it. All the time you spend triaging when hardware is failing, means you lose time to get your backup complete.