Download magisk.zip (on your phone) and save it in a directory of your choice
Download the right twrp for your device on your PC
Rename the twrp image into twrp.img (attention the .img must replace the extension of the file on windows and not be part of the name,so make sure you can read file extensions on windows first)
Put the twrp image into the adb folder
Activate usb debugging into developer options (to activate developer options tap 7/8 over MIUI version into system info)
Plug your phone into your PC
Go into your adb folder and run the cmd prompt as administrator by right clicking on "cmd-here"
You should now have a cmd prompt opened directly into your adb folder
Run now the command "adb devices" the daemon will start asking on your phone for granting authorization
Your phone should now be recognized on your adb
Now reboot your phone into fastboot (you can do it via adb with a command or do it manually by shutting down your phone and booting it pressing and holding your power button plus volume down until fastboot splash screen appears on your phone, you should hear a notification sound in Windows when this happens)
Run the command "fastboot devices" and make sure your device is listed
If yes now run the command "fastboot boot twrp.img"
Your phone now should automatically reboot into twrp
Upon booting twrp will ask for your screen lock password (if a pattern you need to draw it to allow permission to twrp to look into your directories)
Now you have to change your twrp ui language into English so tap on the 3rd button on the right-> then click on the globe icon on the top right and select english then apply
Now that you have your twrp in english go to wipe->manual wipe-> wipe art cache and dalvik
Now exit and go into system-> browse your directories to find your magisk.zip-> select magisk.zip and swipe right to flash -> wait for the installation process -> wipe cache and dalvik again by tapping on the bottom left button and then reboot into system.
Once booted into your phone again tap on magisk into your apps drawer and follow the recommended steps.
Once finished reboot your phone again
Congratulations you have now successfully rooted your phone