With the introduction of iOS 12, Apple has made a big song and danced on digital well-being. With the app limits feature apps can be blocked after a certain time. And that is how it works.
App Limits sounds the same way, it limits the amount of time you can spend with a particular app. You specify the apps (or entire categories of apps), and iOS rejects the launch when you reach the set time. It's great to limit how much time children spend on apps like YouTube, for example, but it can also be helpful if you're having trouble defining boundaries like your social media dependency.
By the way, even after you've reached an app limit You can override it by entering a passcode. This means that you will never be completely excluded from your apps (unless you do not know the code), but setting the limit may be enough to stop you from opening Instagram for the millionth time at 3am.
How To Set an App Limit for a Specific App
To launch the settings, open the Settings app, and then tap Screen Time.
You see a graphic at the top of the next screen. Tap either the graphic or the All Devices option directly above it.
Scroll down to the list of apps you used, and then tap the app they were used for
Tap the Add Limit button at the bottom of the screen.
Finally, set a time limit by scrolling the hours and minutes. To set a limit for different days of the week, tap Fit Days.
Tap "Add" to apply the changes and set the app limit.
To set an app limit for an entire category of apps
The process restarts in App Settings. Tap Screen Time to see all digital wellbeing settings.
Then tap on "App Limits".
 Tap on "Add Limit".
Tap to select a category for which you want to create a new limit, and tap "Next" to continue.
Select the time limit you want to apply. To set different limits for specific days, tap Fit Days. Tap "Back" when you're done. 
You're done setting, and you can set additional limits if you want.