You need to fresh install windows for it to work well with your motherboard as it was working on a different motherboard before. If you are using Windows 10 , Before you do all the swapping link your Microsoft account to the Windows 10 digital license on your device now. Later when you are installing motherboard to your system, Create a bootable USB using the latest windows 10 ISO image, install it and reactivate the windows by using your MS account.
Check the below link:
https://support.microsoft.com/en-us/help/20530/windows-...
Edit:- Media creation tool link: https://www.microsoft.com/en-us/software-download/windo...
For windows 7 use the product key you are having to activate.
Peace.