How often does it happen? Go to your setting->privacy->analytics & improvements-> analytics data, you might have to scroll a bit but do you see any files with the name “panic-full”?
if so your phone is experiencing a kernel panic (like windows BSOD) which could be software or hardware related.
mine 13 pro did that, got a replacement phone and I still have issues. I think it might be a bug in my iCloud backup or an app causing the issue. Try wiping your phone and set it up as a brand new phone and use it for a bit to see if the random reboot still happens.