There is a new Auto Restart feature on Galaxy S23, S23+ & S23 Ultra (see featured image), which will let you schedule auto restart on your device. As per Samsung, sometimes it is better to restart your smartphone to gain its whole energy, so the company introduced it. You can also schedule a restart as per your time when your device is not in use.
It is like an alarm on your phone. You just choose a day and time, and on that particular time, it will auto reboot. If the device is in use at that time, then you can also cancel it. Let me know if you find it useful.