You need to boot the magisk patched image. Once you have that running you can run adb shell and then su.
Su is sudo so you will have to tap grant access on the notification/toast thing or you can open the magisk app and under the superuser tab you toggle the switch to grant root access to the...