"There is just a single prerequisite that you need. You will have to install Android SDK Platform Tools on your PC. Once that is done, proceed with the below steps
- First and foremost, power off your device. Since your device is in a bootloop, it might be difficult to do so. In that case, the safest route is to let the device’s battery be consumed. As the device is already in a bootloop, hence loading the boot animation or the boot-up screen along with that scary bootloader unlock warning message screen should empty the battery juice pretty quickly.
- Once your device has completely turned off, connect it to PC via USB cable. Your device might start charging as soon as you connect it to PC, no issues, let it charge.
- Now head over to the platform-tools folder where you have installed the ADB and Fastboot binaries. Type in CMD in the folder’s address bar and hit Enter. This will launch the Command Prompt.
- Execute the below command in the CMD window and hit Enter:
adb wait-for-device shell magisk --remove-modules
- As soon as you have executed the above command, power on your device (do so by long-pressing the Power key). Now the instance your device boots up, the above ADB command will come into the picture and perform its action of removing all the installed Magisk Modules from your device.
- After this, your device might undergo another random reboot, it is completely normal. Once it does boot up to the OS, the module stands uninstalled and your device is back to normal working condition.
- You could also launch the Magisk Manager app, head over to the Modules section and check the same. That section will be completely empty."
Full article in the link https://www.droidwin.com/fix-magisk-module-bootloop-without-twrp/