The first step is thinking back about any recent changes. New GPU driver? Was BIOS updated recently? Any new hardware change? Was some new program installed recently or other driver updated? And so on. If yes, try to revert your change and see if it helps. Keep in mind that when you want to update a GPU driver, it's best to do a clean installation, especially if it may be causing problems or outright crashing the system. Search for “DDU tutorial.”
If you get an error message or a warning message, try searching the exact wording online for similar problems. There is a good chance someone else had the same or similar issue, and found a solution already.
Sometimes you can't find anything that was modifier recently at all and you don't get any error before a crash. One of the best places to start in that case is possibly through the Event viewer. Press Windows key and type in “Event viewer.” Look through your logs, especially the last ones before the system shut down. Again search the error online and look for similar issues.
Never hurts to try updating your drivers, mainly the GPU driver, to the latest stable version. If you are not sure which one to use, you can check the discord. If you are on the latest stable driver, you can try using the previous stable version. If you want to update the GPU driver, especially as an attempt to fix crashes, do a clean installation. Search for “DDU tutorial.” In some cases, updating the BIOS (sometimes called laptop “firmware”) may be an option, too. However, BIOS updates should be done with extra care. Make sure your laptop is plugged, and that power does not get cut off, and that laptop doesn't get shut down or interrupted while you are updating the BIOS. Any interruption of the BIOS update process will likely result in permanently bricking your laptop, turning it into an expensive paperweight.
Check your CPU and GPU temperatures for throttling, for example with HWiNFO. In extreme cases, when throttling is deemed not enough, the laptop may force a shutdown to prevent any permanent damage. You can also check the RAM and disk using either built in Windows utilities or using some of the free ones online. However, be careful not to download anything from anywhere. Use only reliable, trustworthy websites. Adding a malware to your device won't help fix your problem.
Checking the disk for errors.
Using Windows boot drive, you can perform Windows repair. Boot drive can be obtained from Microsoft website. Search for “Windows installation” or “Boot drive” and follow their instructions. Alternatively, search for “Windows repair” on the Microsoft website, which will guide you step by step through the process.
In extreme cases, a complete reinstalling of Windows may be needed.