Next time when such thing will happen, open Event Viewer application error logs to find out any clue related to the shutdown. This will help to understand exact reason.
Make sure the BIOS is fully updated.
Run the Power Troubleshooter:
- Click on the Windows icon on your computer, then type in Troubleshoot.
- At the left pane, choose Troubleshoot.
- Under Find and fix other problems, click on Power, then Run the troubleshooter.
Open command prompt window as Admin , type SFC /scannow and press Enter and followed by these three commands:
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
If it continues then get it checked by the vendor.