We can decide to what extent we allow notification previews on the lock screen of the Xiaomi smartphone, for example, whether to preview a new message or hide content. The display format can be set as follows:

Note: The option "Show notifications but hide content" is only visible if a screen lock is set.

Android 10 (MIUI 12.0)
Step 1:  Open the  Settings
Step 2:  Tap on  Notifications
Step 3:  Tap on  Lock screen notifications
Step 4:  Tap on  Format
Step 5:  Choose  Show notificaction content  or  Show notifications but hide content
  1. Open the Settings
  2. Tap on Notifications
  3. Tap on Lock screen notifications
  4. Tap on Format
  5. Choose Show notificaction content or Show notifications but hide content

Xiaomi Instructions