i cant remember the last time i reinstall windows before updating my 6700k build, but i didn`t need to buy anything or modified iso to install windows 11. i had a z270 xi hero mb, that had the option to turn on tpm and everything worked fine afterwards
reconnect the sata drive and see if it still boots, im assuming your main boot drive is the m2 and it might be dead.
if after connecting the sata drive the the system still boot. add the m2 drive again and see if it still boot, but chances are one of the drive is bad and its stopping the...
disconnect the drive from the motherboard and see if the pc is able to post to the bios. the drive might have been failing which was why you would get missing boot device sometimes, until it finally failed.