Did you encounter any specific in your command prompt?
If your device specifically requires vbmeta flags to be altered (flags set to 0) and Magisk didn't do it automatically, you can manually hex-edit the image. patch vbmeta in boot image magisk
On your phone, go to Settings > About Phone and tap Build Number seven times to unlock Developer Options. Did you encounter any specific in your command prompt
fastboot getvar current-slot
: Determine your active slot by running fastboot getvar current-slot . If it says a , explicitly flash the image to that slot using fastboot flash boot_a magisk_patched.img . To help narrow down any issues, tell me: What is your specific device make and model ? Which Android version is your device currently running? fastboot getvar current-slot : Determine your active slot
: This process will not work on a locked bootloader. Unlocking your bootloader will factory reset your device.