Yes, you've to format data partition...
Download ROM, reboot in recovery, format data, transfer the ROM on the mobile and install it!
Reboot, setup and, if you want root again, install magisk as usual...
Inviato dal mio Redmi K20 Pro utilizzando Tapatalk