Woah that extremely helpful ! and then I just flash the patched file right ? Hopefully I won't need it but that's great to know. I am planning on rooting 3-4 other devices after this (I found them in my old phone pile while looking for a temporary one since my main needed attention hahaha) thanks for the link as well !
You must use the boot,vbmeta img of the rom version you are using.
No need for Twrp or O.F to root.
Current method to be adapted according to your device.
1. Find or redownload the TGZ file(fastboot rom)
for your current ROM or custom rom
2. Browse inside the zip file and find boot ,vbmeta
under the images folder
3. Copy this file to a temporary location in your PC first, and then transfer it to your phone
4. Install the desired version of Magisk app (V23?)
5. Run the app and choose Install under Magisk
6. Choose Select and Patch a File, then select the boot.img that was transferred earlier
7. A process will run and create a new .img file in the same folder where the original one was
8. Transfer the new file to your PC in the same directory where fastboot.exe is located
9. Open a command prompt window in that same directory
10. Reboot your phone to fastboot mode and connect to PC, USB2.0 port. Check for connection by running command fastboot devices.
11. Run the command fastboot flash boot_ab magiskXXXX.img*
Once it's completed, run command fastboot reboot and the phone should boot and be rooted.
devices with A/B partitions
depending on the type of device