Hi,
You may also refer to the following:
Step through creating a Resource Manager-based Azure Virtual Machine with PowerShell
https://azure.microsoft.com/sv-se/blog/step-through-creating-resource-manager-virtual-machine-powershell
For your migration you may refer to the following documentations:
Migrate your IaaS resources to Azure Resource Manager by March 1, 2023
https://video2.skills-academy.com/en-us/azure//virtual-machines/classic-vm-deprecation
Platform-supported migration of IaaS resources from classic to Azure Resource Manager
https://video2.skills-academy.com/en-us/azure//virtual-machines/linux/migration-classic-resource-manager-overview
Frequently asked questions about classic to Azure Resource Manager migration
https://video2.skills-academy.com/en-us/azure/virtual-machines/windows/migration-classic-resource-manager-faq
Best regards,
Leon