Logout And Shutdown
If you have multiple user logins in your Mac Studio system, then you must first log out and then try to shut down the system. The process remains the same even if you are the only user present in the system. Once you log out of your profile, all the connected apps also get terminated and your system will be ready for a shutdown.
Click on the Apple icon at the top left corner of the screen.
Here choose the logout option.

Confirm the logout option. Please note that logging out will clear all the unsaved progress of open apps.

Once you successfully log out, you can shut down your Mac Studio.
Force quit Apps And Shutdown
Mac system is capable to auto kill the running apps and then shutdown whenever required. But there can be instances where the Mac OS failed to do so. This usually happens when multiple apps are running in the background. To fix this, you need to first force quit these applications and then try to shut down your Mac Studio.
Press the Option, Command, and Esc keys together, it will open the force quit menu.

Now close the background running apps one by one.

Make sure you save any unsaved progress from these applications before quitting them. Once you force quit all the apps, you can shut down the Mac OS without any issues.
Check for Malware
If none of the above methods helps you, then most likely the problem is caused due to malware or virus infection. Usually, Mac systems do not get malware easily, but some malware can be trojan horses which can prevent your Mac system to go to shutdown mode.
The best and easy way to remove any malware is by using Malwarebytes. It is a free problem that can protect your Mac from Malware and other suspicious viruses.

Once you clear your Mac system and remove any existing malware, you can shut down your Mac Studio easily.
Force Shutdown
If none of the options above help you, then your Mac Studio might be stuck in a technical loop and unable to complete the shutdown process. No worries as you can always opt for the force shutdown option by pressing the power key on the main menu.
Press and hold the power key on your Mac Studio machine. Keep holding the power button until you see the screen go blank/blank. After this, remove the power socket from the outlet wall. Now your Mac Studio is completely shut down. Now, if you wish to turn it on again, simply plug the system to the wall outlet, and press the power button to start the system.
Conclusion
This brings us to the end of this guide for fixing Mac Studio not shutting down. Please follow the above guide as it will help you to overcome any technical problems and shut down your computer easily. If none of the above methods helps, then you can always plug off the cable from the wall which will ultimately shut off the whole system.