Hi, I am Dave, I will help you with this.
1
If your PC came with a pre-installed OEM licence, that is locked to the original motherboard and cannot be transferred to the new motherboard, you would need to purchase a new Windows licence.
2
Before you upgrade your hardware, create a bootable Windows 11 USB which you will need to use to clean install Windows 11 after the new hardware is installed.
Click this link:
https://www.microsoft.com/en-us/software-downlo...
to download the Media Creation Tool to create the bootable Windows 11 USB on an empty 8B SB flash drive.
Then, Boot your PC from the Installation Media you just created (change Boot Order in your BIOS) to begin installing Windows 11
During the installation process skip the steps which ask for a product key and select the option 'I am Reinstalling Windows 11 on this PC'.
You will then most likely need to purchase a new Windows licence to activate Windows.