The steps to root your device with Magisk:
First you'll need these tools, Magisk apk, stock boot img/tar, 7zip software and Odin software.
The steps
1-install the last update of magisk in your device.
2- From a Stock firmware extract the boot img/tar and copy it into your device via USB/MTP.
3-...