Hi LittleMo2,
Thanks for reaching out to Apple Support Communities.
You're having an issue with your iPhone restarting on its own.
We're happy to assist.
We recommend checking out the steps in the sections titled "Check your software" and "Check your hardware" from the article here: If your iOS or iPadOS device restarts or displays the Apple logo or a spinning gear unexpectedly
Check your software
Make sure that your device has the latest version of iOS or iPadOS and that your apps are up to date. If the issue continues after updating your software and apps, check your hardware.
Check your hardware
On an iPhone 6 or later, check your battery health under Settings > Battery > Battery Health.
If your battery doesn't need service, and your iPhone, iPad, or iPod touch continues to frequently restart or turn off, contact Apple Support.
If your apps quit unexpectedly, learn what to do.
If your device has a frozen screen, doesn't respond, or becomes stuck when you turn it on, learn what to do for iPhone, iPad, or iPod touch.
We recommend the steps above because they will show you what to do if your iPhone, iPad, or iPod touch unexpectedly restarts, shuts down, or displays the Apple logo or spinning gear.
Should the issue continue, we recommend that you contact Apple Support directly so that they can work with you to find a solution.
You can reach them by clicking here: Apple Support or calling the most local number in your region: Contact Apple for support and service
Thank you for participating in the Apple Support Communities.
Cheers!