Go to Settings > Displays & Brightness > Auto-Lock. Next, select how long you want your iOS device’s screen to stay on for. On an iPhone you can choose between 30 Seconds, 1 Minute, 2 Minutes, 3 Minutes, 4 Minutes, or Never (which will keep the screen on indefinitely).
Change How Long Your iPhone Screen Stays On Before Auto-Locking (howtogeek.com)