One possible cause of this problem is overheating, which can have many causes. However, if your Windows 11/10 computer shuts down randomly but is not overheating, take these steps to fix the issue ...
Starting with Windows 11 25H2 Build 26200.7019 (or 26100.7019 on 24H2) and newer, “Update and shut down" will shut down, not reboot.
Results that may be inaccessible to you are currently showing.
Hide inaccessible results