Virtual machines running any version of Windows require valid licenses. No matter whether you create a new VM or migrate the PC to the virtual machine, you need another Windows license for a virtual machine.
You will need a separate license because the number of Windows licenses depends on the number of processors and processor cores and for that, you are licensing the hardware instead of software and if you will use the same license that already exist on the physical device where this particular VM is running then it will state that the license is already in use.
A Windows 10/11 licence can only be used on one device at a time whether it is a physical or virtual machine.
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–