This guide is specifically for stock T-Mobile firmware on devices that have been carrier unlocked.
If you are carrier unlocked and have unlocked your bootloader and are on OOS 11, then this method will root your device.
Otherwise see the link in the OP for the bootloader unlock thread.
You install magisk-manager on your phone. You copy the patched boot image to the directory on your pc where fastboot is installed.