How to flash Magisk-x.y.z.zip using fastboot without using TWRP? Is it mandatory to use twrp to flash Magisk. Can it be flashed using fastboot
You probably meant fastboot mode.

And no, Magisk cannot be flashed using Fastboot mode. It is a zip file and not an image file that you can just flash to a partition.  If you want to use fastboot, you should consider patching your boot image using Magisk Manager and then boot that image using fastboot boot command.

fastboot boot magisk-patched.img


Or if you are sure you have the correct boot image, you can flash the patched image too:

fastboot flash boot magisk-patched.img