This sounds like a over-heating problem. When was the PC last cleaned out, physically? Could well be a built-up of dirt/fluff inside, this not unusual. Probably just needs a good clean-out, carefully using a vacuum cleaner and a soft brush, including all internal fans and grills.
OnePlus 5T review: Hands-on