Is your iPhone rebooting after being inactive? It's a feature, not a bug
Introduced with iOS 18, the new feature automatically reboots an iPhone if it's been asleep and in lock mode for an extended period of time. After a reboot, an iPhone becomes more difficult to crack since either the passcode or biometric verification is needed to unlock it.