Enable Downtime to Limit Certain Apps
Smartphone addiction is a real thing — and Apple wanted to curb it by adding Screen Time in iOS 12. This allows all users to track their smartphone habits and how much time they spend on certain apps.
With these insights, Apple also added functionalities that can help users take some time off from their smartphones. One of these is Downtime. Downtime allows you to schedule your own time to take a break from your iPhone. When it is enabled, only phone calls and any other apps you choose will be accessible.
Go to Settings > Screen Time > Downtime. Once toggled on, you can set your own schedule.