I used Apple Configurator on my mac to supervise my iphone. Once that's done, you use configurator to add a profile to the device that (1) contains an allowlist of apps that can be used and (2) an empty allowlist of websites that can be visited. #1 means you can't use any new apps, and #2 prevents the ability to browse the internet by sending links to yourself in e.g. messenger or whatsapp.