Question Windows 10 PC Freezes after couple minutes

Nov 6, 2022
Recently got a pc gifted from a friend, because after an update his pc was locked with a bios password. I was able to by pass this and reinstalled a clean version of windows but after around 2-5 minutes the PC would totally freeze up. Keyboard did not respond, mouse didn’t respond, PC was completely unresponsive so the only solution was to power it down. The PC however does not freeze when in safe mode, I also clean installed a new graphics card driver, temperatures checked out ok, and I noticed the computer oddly did not freeze when I was playing rocket league. Nothing in task manager seemed to spike or anything when then computer froze.
There has been a couple times where the pc hasn’t froze, but it ends up randomly restarting after about 15 minutes