Hello Aardash !
Thank you for posting on MS Learn Q&A.
The SQL Server key is not retrieved from the Azure subscription or the deleted VM and it must come from your org licensing agreement or CSP purchase record.
Go to Microsoft 365 admin center then Billing then Your products then Volume licensing.
Then use Products and services then View downloads and keys and search for SQL Server 2022.
For SQL Server 2022, the embedded license product key can be shown in the product details Keys tab alternatively download the SQL Server media and check x64\DefaultSetup.ini.
https://learn.microsoft.com/en-us/microsoft-365/commerce/licenses/product-keys-for-vl?view=o365-worldwide
You can also go to Volume licensing then Contracts then View contracts then View product keys for the relevant License ID.
For access, the user must have a Volume Licensing role for the relevant License ID. A normal Global Administrator role is not enough by itself. because they do not automatically have access to VL features and a VL Agreement Administrator must add them. The roles most relevant here are Product keys reader, Product download manager, License position reader or Administrator depending on whether the person needs keys, downloads, license summaries or role management.
If you want to confirm entitlement, you need to use Contracts then Create License Summary. The license summary shows entitlements, effective quantity and active Software Assurance quantity for License IDs you can view. Active SA quantity is the key field for Azure Hybrid Benefit eligibility.
If your licenses were bought under MPSA, CSP, MCA, OEM or retail, they might not appear in classic VL contracts, so check the appropriate purchase channel or partner.
https://learn.microsoft.com/en-us/microsoft-365/commerce/licenses/view-vl-contracts?view=o365-worldwide
For the SQL Server instances, Evaluation then Enterprise is a supported SQL Server 2022 edition upgrade for standalone installations and Setup asks for a production PID/product key during the edition upgrade.
Also note that SQL Server Evaluation is for internal evaluation only and is not licensed for production use, so this should be treated as urgent from a compliance perspective.
For the additional 2 Enterprise VMs, work with your Microsoft reseller / Licensing Solution Partner / Microsoft account representative to purchase enough SQL Server Enterprise core licenses, preferably with Software Assurance or qualifying subscription rights if you want Azure Hybrid Benefit. Enterprise is considered as a 2-core pack under Volume Licensing, and notes Azure Hybrid Benefit as a Software Assurance benefit.
https://www.microsoft.com/en-us/sql-server/sql-server-2022-pricing
For SQL Server on Azure VM, Azure Hybrid Benefit requires SQL Server licenses with active Software Assurance or qualifying subscription licenses. Microsoft also notes that only SQL Server core-based licensing with SA or subscription licenses is eligible for the full Azure Hybrid Benefit; Server + CAL with SA can use license mobility/BYOL but not all AHB features.
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/licensing-model-azure-hybrid-benefit-ahb-change?view=azuresql
After the VM is running licensed SQL Server Enterprise, register it with the SQL IaaS Agent extension if it is self-installed, then set the SQL VM license type to AHUB:
az provider register --namespace Microsoft.SqlVirtualMachine
az sql vm create \
--name <vm_name> \
--resource-group <resource_group_name> \
--location <vm_location> \
--license-type AHUB
For an already registered SQL VM resource:
az sql vm update \
--name <sql_vm_resource_name> \
--resource-group <resource_group_name> \
--license-type AHUB
PAYG, AHUB and DR as the SQL VM license-type values, and states that self-installed SQL Server VMs must be manually registered with the SQL IaaS Agent extension.
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-agent-extension-manually-register-single-vm?view=azuresql