Hi @Roger Roger
Thank You for posting in Q & A.
You can't add an existing VM to an availability set after it's created.
VMs must be created within the availability set to make sure they're correctly distributed across the hardware.
A VM can only be added to an availability set when it is created. To change the availability set, you need to delete and then recreate the virtual machine.
Refer-
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-availability-sets
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/change-availability-set
If the Answer is helpful, please click Accept Answer
and up-vote, this can be beneficial to other community members.