Thank you for your support for the Xiaomi product. We apologize for the inconvenience.
Please check whether you have logged into your Google account on the device and then restored it to factory settings without first logging out of your Google account. If this is the case, you will encounter a security mechanism implemented by Google to protect your device and personal information. This scenario is not a malfunction, but rather a protective measure to prevent unauthorized access and ensure the safety of your account. To resolve this, please log into your Google account again on the device, and set or reset your password as necessary. Once you’ve completed this step, you can regain full access to your device.
Does it help?