edit: I have lost root and haven’t fixed it yet, so for now, this doesn’t seem to work.
None of the guides I could find on the internet worked for installing the patched boot image that magisk creates on a Galaxy Note 9 running LineageOS 20. I found a solution; heimdall, which you probably used to install lineage in the first place.
Once you have the patched boot image from magisk, just flash it using heimdall instead of fastboot:
Put phone in download mode (can be done from lineage recovery by choosing “bootloader”, alternatively you can hold down several buttons at the same time (volume down + bixby + power while plugging in a usb I think?)),
./heimdall flash --BOOT /tmp/magisk_patched-26100_kPXYn.img --no-reboot
Reboot and enjoy Magisk.
Also while this worked for me I make no guarantees. I was doing this on a test, spare phone, with no data I was worried about losing. Always have a backup.