You can choose how many time is needed till your device goes into sleep mode.

Android 9
Step 1:  Open the  settings
Step 2:  Tap on  Display
Step 3:  Tap on  Advanced
Step 4:  Tap on  Sleep
Step 5:  Choose an  option
  1. Open the settings
  2. Tap on Display
  3. Tap on Advanced
  4. Tap on Sleep
  5. Choose an option

Android Instructions
Read more