How to force a factory reset or hard reset on Xiaomi devices

Xiaomi Redmi 6A Xiaomi Redmi 6A
Xiaomi Mi 8 Explorer Xiaomi Mi 8 Explorer
Xiaomi Mi 8 Xiaomi Mi 8
Xiaomi Mi 8 SE Xiaomi Mi 8 SE
Xiaomi Redmi S2 (Redmi Y2) Xiaomi Redmi S2 (Redmi Y2)
Xiaomi Mi Mix 2S Xiaomi Mi Mix 2S
Xiaomi Redmi Note 5 AI Dual Camera Xiaomi Redmi Note 5 AI Dual Camera
Xiaomi Redmi Note 5 Pro Xiaomi Redmi Note 5 Pro
Xiaomi Black Shark Xiaomi Black Shark
Xiaomi Redmi Note 5 (Redmi 5 Plus) Xiaomi Redmi Note 5 (Redmi 5 Plus)
Xiaomi Redmi 5 Xiaomi Redmi 5
Xiaomi Redmi 5A Xiaomi Redmi 5A
Xiaomi Redmi Y1 (Note 5A) Xiaomi Redmi Y1 (Note 5A)
Xiaomi Redmi Y1 Lite Xiaomi Redmi Y1 Lite
Xiaomi Mi Note 3 Xiaomi Mi Note 3
Xiaomi Mi Mix 2 Xiaomi Mi Mix 2
Xiaomi Mi A1 (Mi 5X) Xiaomi Mi A1 (Mi 5X)
Xiaomi Mi 6 Plus Xiaomi Mi 6 Plus
Xiaomi Mi Note Plus Xiaomi Mi Note Plus
Xiaomi Mi 1S Xiaomi Mi 1S