Magisk is a suite of open source software for customizing Android, supporting devices higher than Android 5.0.
Some highlight features:
Install Magisk via F-Droid - https://f-droid.org/en/packages/com.topjohnwu.magisk/.
Follow the instructions at https://topjohnwu.github.io/Magisk/install.html.
This is for LineageOS recovery only. After updating LineageOS, you must perform the procedure again - https://topjohnwu.github.io/Magisk/install.html#patching-images
We created a quick script for it at https://git.digitalprivacy.diy/DIY/magisk_boot.sh.