Hello Jimmy,
Blue screen error occur when some issues with low level software running in windows kernel, some problems in computer hardware driver or hardware software.
Due to this critical failure causes Windows can be crash and stop working. The only thing windows can do at that point is restart the PC. It can lead to data loss, because programs don’t have a chance to save their open data that time.
For this issue you may applied some manual steps like, use system restore, scan for malware, install update driver, boot into safe mode, check the hardware problem, Reinstall windows. If you find yourself in data loss situation you may try third party free data recovery program like Stellar Data Recovery Free Edition, Recuva, Testdisk etc. It is totally free utilities.