@Caroline1991: If you notice an improvement while you're in Safe Mode, and the phone no longer restarts randomly, then please restart the S21 Ultra as you would normally and uninstall any third party apps, as the issue is likely to be stemming from an external source.
I'm experiencing the same issue. My phone usually restarts in the morning, but I've also noticed it happen randomly at other times in the day. This never happened with my previous s7 with the same apps installed. The auto restart setting is turned off on my phone. Please let us know if you figure out what is causing this. I have lots of apps I use on a regular basis and reinstalling each of them sequentially to try to figure out which one may be causing the problem is not really feasible. I would be working on this for many days if not weeks.
Might help you all but I found the issue appears to be when you use smart switch
I reset mine again yesterday. Didn't use smart switch and its not restarted since
Appears some setting you transfer causes issues or did for me
Probably jinx myself now but I'll update again in 24 hours