In the Xiaomi smartphone's memory settings, we find the function for cleaning up memory (RAM), including junk files, cache data, or remaining files, and we are also offered to uninstall apps that have not been used for a long time.

Note: The options to be cleaned up can be selected and deselected individually.

Android 10 (MIUI 12.0)
Step 1:  Open the  Settings
Step 2:  Tap on  About phone
Step 3:  Tap on  Storage
Step 4:  Tap on  Free up space
Step 5:  Tap on  Clean up...
  1. Open the Settings
  2. Tap on About phone
  3. Tap on Storage
  4. Tap on Free up space
  5. Tap on Clean up...

Xiaomi Instructions