New laptop randomly shuts down

I purchased a new laptop and it randomly shuts down when I'm working. Sometimes it happens a couple times a day, sometimes not for a few days, but it does keep happening. I'm not sure what to do to troubleshoot before I would attempt returning it. I have tried restarting but at this point I'm guessing it needs returned. Any advice? Thank you.
