I assume the setting to restart itself isn't turned On @latchford1987 in Settings, General Management, Reset and Auto Restart.
If not then please begin by putting the phone in Safe Mode which disables your downloaded app's but let's your stock app's keep working. If the issues stop then this highlights a downloaded app as the possible issue. Come out of Safe Mode and start deleting your most recent downloaded app's one at a time until it stops.
If it does not stop in Safe Mode then come out of Safe Mode and clear the system files cache logs. Clear your phone's System Cache Files by turning your phone Off and then from a set series of button presses go into the phone's System Files and clear the cache. No information is lost this way. You may need to insert your headphones or hook upto a computer with your data cable to get to this menu on the phone.
Finally as a last resort back up and remove any relevant sd card and factory reset.
I hope the above helps @latchford1987
Daily Driver > Samsung Galaxy s²³ Ultra 512Gb in Phantom Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help. " This is the way. "
I am facing the same problem and i went to samsung agent in egypt they said we never face this problem then they format the mobile and the problem still exist