There are three ways to do this. If you're an Enterprise Agreement (EA) customer, you can provision one of the virtual machine images that supports licenses, which is also known as bring-your-own-license (BYOL). If you have Software Assurance, you can enable the Azure Hybrid Benefit on an existing pay-as-you-go (PAYG) image. Or you can copy the SQL Server installation media to a Windows Server VM, and then install SQL Server on the VM. Be sure to register your SQL Server VM with the extension for features such as portal management, automated backup and automated patching.
Please refer to these documentation links for details:
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/frequently-asked-questions-faq#licensing
Similar thread posted here which might help as well : https://learn.microsoft.com/en-us/answers/questions/90678/byol-for-manually-installing-sql-server-on-azure-v.html