You can limit screen time on your iPhone using the "Screen Time" feature, which will lock your apps and make them temporarily unusable. Here's how.
Losing access to your iPhone’s Screen Time passcode can be a significant inconvenience, especially when it limits your ability to manage app usage, content restrictions, or device settings.
You can lock apps on an iPhone with a passcode-protected time limit in Screen Time. Here's how to do it.