Hello paddy986,
Welcome to Apple Support Communities!
If we understand your post correctly, your new MacBook Air crashes randomly and then restarts. We'd like to help1
Let's try an SMC reset.
How to reset the SMC of your Mac
You may also want to try an NVRAM reset.
Reset NVRAM or PRAM on your Mac
We also recommend starting in safe mode. Sometimes just starting in this mode and then restarting can resolve issues like this: How to use safe mode on your Mac
You can also create another user on your Mac and test to see if you experience the same issue.
Set up users, guests, and groups on Mac
You may want to also run Disk Utility which will check for and fix errors related to the formatting and directory structure of a Mac storage device.
Repair a storage device in Disk Utility on Mac
Have you been in contact with the store that you purchased your Mac from?
Thank you for using Apple Support Communities.
Take care!