My daily driver laptop is still my Dell XPS 15 9500, which was top of the range back in early 2017 when I got it, but now it's slightly starting to show it's age.
One of more annoying problems it has developed recently is randomly grinding to a halt and then shutting itself down unexpectedly. This usually happens when I'm running a a lot of high powered applications and the laptop does get very hot on the underside.
After a bit of research I found that this usually happens when the CPU has been powered at 100% for a length of time, and then Windows decides that shutting down the machine is the best way to protect the hardware.
I had a bit of a poke around the drivers and Windows settings and found quite a few things which I think have helped. These sorts of problems usually have a number of causes so I'm not 100% sure that this has fixed the issue but it seems to be working right now.
If you navigate to Windows Settings -> System -> Power & Sleep and click the "Additional Power Settings" link, you should get the Power Options dialog.
From here, click "Change plan settings" and then "Change advanced power settings" to open up the Advanced Settings tab.
Open the "Processor power management" and then "Maximum processor state" and from here you can state how much of the processor capability you want to use.
The default is 100%, and here I have mine set to 85%. This is obviously a drastic underclocking performance hit for the processor, but it has solved my overheating problem.
Have a play with the values and find something that is balanced for your needs.
Stuff like that makes me realise even more that I'm way overdue for an upgrade. It's for client work, so the cost of a new PC is justified, right?