Generation 2 Hyper-V virtual machines have more resource and security features than generation 1 machines, so it is recommended to require version 2. For more information on the resource and security features available in version 2, see the Azure documentation.
References:
https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2
https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-vbs
In Terraform -
References:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/image