Use "Modes and Routines" in "Settings", create a new mode, in "Turn on automatically", choose the "App opened" to specify which apps you want the screen to stay on. Then in "Other actions", choose "Add action" and "Screen timeout" to 10 minutes max.
If you want duration longer than 10 minutes, you will need other apps. Tasker is one of them.