You can recover from magisk really easily just flash stock boot.img the image before magisk patch
True. But if one had a bootloop with Magisk, next time he attempts to install Magisk, Magisk will again find its old stuff at /data/adb (not removed by flashing the original boot.img - will be removed only by Factory resetting, hence by wiping or formatting Data), like magisk.db (database) and its modules folder, and if anything there was incompatible with the new ROM, Magisk will bootloop again
Hence the correct way to recover from Magisk bootloops will be by properly uninstalling Magisk or at least by deleting /data/adb folder from TWRP (and then either by reinstalling Magisk or by flashing the original boot.img)
---
For at least a year or so, TWRP makes it possible to flash Magisk apk file without renaming - ie, one can flash it under its original apk name through TWRP (TWRP will recognize that it was the zip installation file and will properly flash Magisk)
---
Nevertheless, for already about two or three years, TJW (creator of Magisk) clearly recommends through his Magisk GitHub Documentation that Magisk be primarily installed by:
- install Magisk app
- extract boot.img (eg, from the ROM zip installation)
- patch the boot.img by Magisk app
- transfer the patched boot img to PC and flash by fastboot
Ie, the old-school Magisk installation by flashing through TWRP may still work but only for those devices, Android versions and ROMs where the appropriate TWRP is available (like fortunately still for the Xiaomi.eu).
But Magisk can be also installed by patching and flashing method (and that way one can avoid any troubles and issues with possibly incompatible TWRP versions and so) - and there is nothing wrong with that method (except that there are still many users who are not familiar with)