The Google Play Protect feature protects the Xiaomi smartphone from malicious apps by scanning for malware before downloading and during installation, as well as periodically scanning apps from unknown sources.

In the event of a detection, a notification is displayed on the Xiaomi device, and depending on the severity of the malware, the app can also be automatically disabled by Play Protect until it is uninstalled.

Note: Google Play Protect is a feature of the Google Play App Store, so there is no direct option in the settings, only a link to the feature where it can be enabled or disabled.

Android 10 (MIUI 12.0)
Step 1:  Open the  Settings
Step 2:  Tap on  Passwords & security
Step 3:  Tap on  Privacy
Step 4:  Tap on  Google Play Protect
Step 5:  Open the  Settings
Step 6:  Enable or disable  Scan apps with   Play Protect
Step 7:  Confirm with  Turn off
  1. Open the Settings
  2. Tap on Passwords & security
  3. Tap on Privacy
  4. Tap on Google Play Protect
  5. Open the Settings
  6. Enable or disable Scan apps with Play Protect
  7. Confirm with Turn off

Xiaomi Instructions