Phone Bricked While ROOT or Bootloader Unlock? Here’s How can You Fix

Option 1 – Reboot to Safe mode & remove Magisk modules​

Option A : Safe Mode
1. Hold power until it goes off
2. Boot and wait for the bootloader warning
3. Hold vol up and down until boot animation
4. Once it’s booted just reboot again and you’re done
Now on boot all magisk modules are disabled

Option B : thru adb command
1. Code with phone connected with USB debugging on (from developpers options):
“adb wait-for-device shell magisk –remove-modules”
2. reboot

Option 2 – Get back the original boot.img​

If your device can go to fastboot mode:
Flash back the original boot.img (w/o magisk) and reboot
Code once in fastboot mode:
“fastboot flash Original_boot.img” (use the “Original_boot.img” from the above zip file)
Change to the exact name “Original_boot.img” of the boot that has been posted in the above zip file
“fastboot reboot”

Option 3 – Flash back full OTA file​

If you can still go to Settings:
Flash back the OTA RUU full package and reboot

Option 4 – Change the active slot​

If your device can go to fastboot mode:
“fastboot getvar current-slot”
This will tell you what (corrupted) slot you are currently booting from (either a or b).

Then just change to the other slot with the following command:
“fastboot –set-active=a”
or
“fastboot –set-active=b”
Then reboot with the command:
“fastboot reboot”

Option 5 – Wipe data in Recovery mode or fastboot command​

Option A : If your device can still go to Recovery mode (ie thru fastboot mode: “fastboot reboot recovery”)
From Recovery Wipe data and reboot

Option B :
Code once in fastboot mode:
“fastboot- w”

Option 6 – MSM​

If none of the above works then go for MSM tool

Option 1 to 4 would normally not alter your personal data, applications and own set-up
Option 5 & 6 will wipe your personal data and applications

Source : XDA