An Azure service that is used to provision Windows and Linux virtual machines.
Complementing what Jimmy said, the inplace upgrade is not possible,
But you can do these steps:
download your VM,
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/download-vhd?tabs=azure-portal
deploy to your onpremise Hyper-v,
upgrade,
https://learn.microsoft.com/en-us/windows-server/get-started/perform-in-place-upgrade
generalize the VM and upload to Azure.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/upload-generalized-managed
Reference: https://learn.microsoft.com/en-US/troubleshoot/azure/virtual-machines/in-place-system-upgrade#method-2-download-and-upgrade-the-vhd
Get in touch if you need more help with this issue.
--please don't forget to "[Accept the answer]" if the reply is helpful--