Since you say it does this at startup, does it also happen if you start the laptop in safe mode. Since it is random you may have to try several times if it doesn’t fail in safe mode, just to make sure.
If it never fails in safe mode when starting, then you have a driver problem. Check that your drivers are all up to date, especially the video drivers.
If it also occurs in safe mode then check in Event Viewer for any Critical, Warning or Error events that are logged at the time the laptop shuts down that may give a clue as to what is happening.
If there are entries having the same Event ID number Source search online using the Event ID and Source information to find out what it means and what the cause may be.
To get to Event Viewer, press the Win key + x key (both together) and then click on the Event Viewer link that appears in the menu box.
When Event Viewer finally opens (be patient it may take a little while go to Event Viewer (local) > Summary of Administrative Events box to view all the events.
Double click on any entry that has multiple entries to get more information regarding the event.
As the problem is intermittent and random it may take a while to find but this may be a good place to start.