If you are using MIUI 14, You have to enable Install via USB option. For this I was asked to "insert SIM card", did the same and removed the sim after enabling the toggle switch. The error didn't reappear.