The Xiaomi smartphone can automatically go into standby or sleep mode after a certain time of inactivity, with a minimum of 15 seconds to a maximum of 10 minutes.

Note: If a lock screen password or fingerprint is set as the unlock method on the device, it is required to unlock the device in order to use it again.

Android 10 (MIUI 12.0)
Step 1:  Open the  Settings
Step 2:  Tap on  Always-on display & Lock screen
Step 3:  Tap on  Sleep
Step 4:  Set a  sleep timer
  1. Open the Settings
  2. Tap on Always-on display & Lock screen
  3. Tap on Sleep
  4. Set a sleep timer

Xiaomi Instructions