Recovery and bootloader are part of the same /boot partition on A/B devices so when you flash a recovery you need to reflash any boot related stuff like Magisk. There is a boot_a and a boot_b for each slot, so normally you'd have to switch slots and reflash to flash the opposite slot but Magisk takes care of this for you (not sure if TWRP does nowadays, used to have to flash TWRP, then Magisk, then switch slots and repeat).
On the 8T, recovery and boot are physically separate partitions, even though the 8T is an A/B device.
Thank you both, but still I am unsure of how to handle the 8T partitions, could you help me with these questions?:
1. Do I have to install TWRP on both slots? (I used
fastboot flash recovery twrp.img the first time)
2. So the slots are like multiboot?
3. Can I have two different ROMs and use them both?
4. And what about kernels, do they have two slots too?
5. I had latest stock rom installed and I used copy_partition.zip before and after installing LineageOS. It bootlooped then I flashed LineageOS again and it worked. Now I am booting from
slot_a. What happens if I now try to boot from
slot_b? I mean, my data is shared between slots and only the system files are in two different slots or what?
6. Is there a step-by-step guide of how to update Lineage-OS while keeping twrp and magisk?