The recovery cannot detect your boot partition due to dynamic partitions. Fix: Use the Magisk app’s "Install → Select and Patch a File" option on your stock boot.img . Then flash the patched image via fastboot: fastboot flash boot magisk_patched.img
v24.0 was the first stable release to fully support the then-new Android 12 architecture. magisk v24.0 zip