From the Settings app, scroll to and tap StandBy.
Tap or slide the StandBy switch to ON.
From here you can select your preferences. The following step is only available to iPhone 14 Pro and later models.
Tap Display.
Select your preferences.
Changing this will affect when your iPhone turns off when not in use.
You've completed the steps!
