Windows Server Licensing

If you have Windows Server Core licensing with Software Assurance, you should enable Azure Hybrid Benefit within the VM’s configuration to take advantage of a significant discount for Windows Server VM’s. This isn’t applicable for Unix-like OS’ in Azure unless a license is required, like an appliance.

Without Azure Hybrid Benefit, your licensing will be billed for each Windows VM that is running; when a Windows VM is deallocated, your license utilization for that VM also stops. Be sure to deallocate, not stop, as the latter still incurs a cost. Deallocating ensure the VM's resources have been freed up at the host-level; stopping the VM only stops the OS and leaves the resources allocated to that VM, costing you money.
These charges are also accumulated with associated running costs, including compute while the VM is running, storage is billed regardless of whether the VM is running or deallocated and static or dynamic public IP's are billed differently. 

It is also important to license your VM’s carefully in Azure to ensure this aligns with what you have purchased from your Microsoft vendor.
For example, if you have an Windows Server Datacenter Core License count of 80, you can have up to 20 Windows VM’s in Azure covered by your Azure Hybrid Benefit which allows up to 8 vCPU’s or less per VM. I’ll explain how to calculate this figure soon.
Even if a Windows Server VM only has 2 vCPU’s, your license is rounded up to an 8 core license. For a VM that has 12 vCPU’s, the core license is then rounded up to 16, 20 vCPU’s equals 24 core license, etc.

To clearly articulate how we get the 80 Windows Server Datacenter Core License count, let’s say all 20 VM’s in Azure have 8 or less vCPU’s, so 20 VM’s times the 8 core license figure per VM equals 160, then you divide this by half, equaling 80. Each core license is a pack of two, which is why you divide this by half to get your total core license count.
Your licensing in Azure can also be cheaper if you have migrated many Standard Server VM’s from on premise; these can be licensed under the Windows Standard Server Core License, which is much cheaper than Datacenter.
There is no option to deploy Windows Server Standard VM's from the Azure Marketplace unless you have migrated them or deploying your own image.

System Center Licensing on the other hand is calculated differently; for every 10 Windows Server VM’s System Center manages, you require a 16 core license.
These licenses only needed if you are managing Windows Server, not endpoint OS’ like Windows 10 as these fall under the Endpoint Manager licenses that are included with your Microsoft 365 E5 licenses.