Both Apple and Android have this feature preloaded. On Apple it’s called Guided Access and is three taps of the power button if enabled. On Android I’m not sure but I do know it exists (edit: it’s called App Pinning)
On iOS you can also disable specific actions and even select areas of the screen you want to disable touchscreen usage over.
On iOS you can also disable specific actions and even select areas of the screen you want to disable touchscreen usage over.