Download the full OTA zip, Disable all your Magisk modules and reboot to TWRP.
Flash the full OTA zip (it will flash to the inactive slot and restore to the stock boot image, so no TWRP and Magisk in the inactive slot after this).
Flash the TWRP installer (it will install TWRP to both slots).
Choose reboot to TWRP, now you are in the new slot with an updated system, flash Magisk
Reboot to the system, re-enable your Magisk modules and reboot