You ever sat there watching a video and suddenly got a PC shutdown that you didn’t perform yourself? Doesn’t half shock ya!
It could be that your PC, especially a smaller one, or a laptop is trying to protect itself from overheating. If it happens, allow the machine to cool down and give all the vents a proper blast with air to clear them. Fans can get clogged up. Dust can cause heat buildup, especially in a smaller lappy. Any time you’re cleaning your work area, save some energy to actually clean your computer! It’ll work better 😀
This might also be helpful: