Hello Niket Kumar Singh,
Welcome to microsoft Q&A, Thankyou for posting your query here.
The cost of the Windows license for Azure virtual machines is calculated based on the size of the VM and the number of cores that are used.
The cost of the license is included in the hourly price of the VM.
Therefore, the cost of the Windows license does vary based on the size and specifications of the VM.
Apart from the VM size, there are no other factors that affect the cost of the Windows license on Azure.
If you use Azure Hybrid Benefit i.e. you have your own windows license brought externally and using to create VM in azure then the windows licensing cost does not vary depending on the size of the VM
If an answer has been helpful, please consider accepting the answer to help increase visibility of this question for other members of the Microsoft Q&A community. If not, please let us know what is still needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!