Building on both @NathanCu & @Khamrun suggestions (and both, please feel free to update/add to the following since it can be edited), you may want to check this:
How to Troubleshoot Raspberry Pi Crashing.