Question PC Keeps rebooting

Sep 5, 2021
1
0
10
Recently purchased a prebuilt pc off Newegg, had trouble with it not connecting to my monitor, keyboard and mouse. I’d taken all my parts out besides my motherboard and cpu out and put it into my friends old Pc case and it had worked perfectly then. I changed out my motherboard and put in two new sticks of ram and put it all back into my old pc case. Was working fine for an hour and then it continued to reboot immediately after. I’m thinking it’s my old cpu and I was thinking about replacing it and seeing if that would work. Any thoughts or help about my problem would be greatly appreciated!