I had this gaming laptop, Dell G5 1060 6GB, 16 gb of ram, I5-8300H, 1TB hard drive, 256 SSD. When I play games it would be fine for around 2 minutes, then it would do drop the fps to around 15-20 fps for around 5 seconds then run at the usual 60-100 FPS. I have tried updating drivers. When I'm in game the temp for the CPU goes to 85-95 C but when it starts to lag it never goes to 100C.
If under warranty, I would contact the manufacturer. If not, then you need to first make sure it is all clean inside. No dust, debris, blocked vents, fans, etc. If that doesn't lower the temps then the thermal paste may need replacing.