Hardware problems are hard to diagnose and solve. First, confirm that you aren’t just getting the latest wave of Windows updates, which can automatically restart your computer during installation.
Then work on updating all of your critical system drivers. Your graphics card, motherboard, and network card drivers are crucial.
Sometimes it can be viruses, adware, or overheating, and sometimes it can be something as simple as making sure your video card is updated.
Is your computer making weird noises? If you’re lucky all you’ll need to do is give the machine a thorough cleaning.
Modern computers have safeguards that shut down the system if a component is overheating. Which can be the cause of frequent restarts when you’re running resource-intensive programs or video games.