To disable the auto-lock option, depending on the iOS version, follow the steps below:

iOS 10 and higher

  1. Go to “Settings”

  2. Choose “Display & Brightness”

  3. Click on “Auto-Lock” and select "Never"

iOS 9.x and earlier

  1. Go to “Settings” on your phone

  2. Choose "General"

  3. Scroll down to find the "Auto-Lock" option

  4. Click on it and select "Never"