Install to both slots.
Fastboot flash –slot all boot twrp.img
Steps to install custom roms and root with Magisk.
Put magisk.zip, rom and twrp.img on your internal storage.
Reboot to twrp recovery.
Factory reset.
Install, select ROM zip and swipe to flash.