This article explains how to set up and use iPhone restrictions, which are now part of the Screen Time tool. Instructions work for all currently supported versions of iOS.
To enable and configure these controls, follow these steps:
Tap Settings > Screen Time > Content & Privacy Restrictions.
Tap Content & Privacy Restrictions so the switch is green/on. From that screen, configure specific preferences as you need.