Sudden reboot and install screen on login
The simple explanation is a macOS installer was in your Applications folder (or elsewhere) and was run. 30 minutes to install isn’t out of line - especially on a machine with a bit of history or third party apps.

The logical place where running an installer happens is when you enroll / allow automatic updates in System Preferences and then in the Notification Center where options like restart now or update later are presented.
What next? Perhaps look in /var/log/install.log to see if you agree with the recent actions logged. Possibly boot to recovery and install a good clean download of the latest macOS on top of your install if you feel you can’t trace why the installer ran. Make a backup for sure, if your mac is compromised - an erase install and selective restore from backup might be needed. To me, there are very common reasons for this to happen and no particular signs you have any issues unless you can not determine why the installer ran via defaults or someone opening it manually.