When handing your device over to someone else, such as a child, you can use Guided Access mode to restrict access to certain buttons. To enable this, open the Settings app and select Accessibility. From here choose Guided Access and turn it on. Tap Set Passcode too, so it can’t be turned off too easily.
While using an app, quickly triple-press the Side button or Home button to turn on Guided Access mode. You can then draw around buttons on screen that you don’t want to be enabled, such as links to in-app stores, before handing over your iPhone.
There are some extra options within Guided Access Mode that you can also enable. Tap Options to reveal them. Here you can decided if certain buttons should be enabled, such as the Sleep/Wake Button, Volume Buttons, Keyboards, and more. It’s also possible to set a Time Limit so you can limit iPhone usage and retrieve your device.
When you get the device back, triple-press the Side button or Home button, enter your passcode, and select End.