Magisk is a suite of open source software for customizing Android, supporting devices higher than Android 5.0.
Here are some feature highlights:
MagiskSU: Provide root access for applications
Magisk Modules: Modify read-only partitions by installing modules
MagiskHide: Hide Magisk from root detections / system integrity checks
MagiskBoot: The most complete tool for unpacking and repacking Android boot images
The latest Magisk root comes in the form of an APK file but you can simply rename the .apk file extension to .zip, for example: Magisk-v22.0.apk → Magisk-v22.0.zip. Flash the zip just like any other ordinary flashable zip. You can find a full list of installation and setup instruction HERE. From my experience it best to install Magisk app on your device and do the boot.img patch with the app then you can use other methods such has fastboot to install the newly created patched boot.img to gain root access on your device. Good luck and read up until you have a firm understanding of the steps need to complete this task.