As others have said the shutting off sounds like a overheating issue.

I had a Dell about 10 years ago that had a design flaw, and was not cooling properly. The CPU actually melted. Dell sent a replacement that fixed the design problem.