We just recently had this talk.
I'll start out by saying - BACK UP EVERYTHING YOU DON'T WANT TO LOSE BEFORE YOU DO ANYTHING.
Once you get THAT done, here's the spiel on upgrading motherboard hardware and migrating OS'es.
If you are on an AMD system, re-installing the operating system is going to pretty much be an absolute MUST. AMD publishes individual driver packages for each one of their chipsets. If you need to download AMD chipset drivers, you go to their website and look up the SPECIFIC chipset you have, and download that driver. So because each chipset is driver is so unique, taking your windows install from 1 AMD system to a newer one is usually impossible.
If you are on an INTEL system, and are using INTEL chipset motherboards, you MAY be in luck. Intel does not put out driver packages for individual chipsets, if you want Intel chipset drivers you go to the Intel website and download THE Intel chipset driver. There's only ONE. It's a unified driver package that covers all their chipsets. What this means, is that it is VERY POSSIBLE to take your Windows OS and stick that drive in another Intel chipset-based system and it'll boot right to windows.
Then all you have to do is go through all your normal driver installations and you'll have a fully functioning OS and won't have lost anything but a little time.
I have a good deal of personal experience with this. My last 2 upgrades have been from a 4790k to a 9700k, and my 9700k I just upgraded a few weeks ago to a 12700kf (Z390 to Z690). Each time I have had no problems migrating my Windows install to my new hardware. On my last install I even converted an MBR booting system to UEFI before migration, so I had that additional step to contend with, and still Windows works perfectly.
Does that mean it's GUARANTEED? Absolutely not - apparently the discussion comes up quite often here, lol. So as I said at the beginning of this diatribe, DO YOUR BACKUPS FIRST. That way, if you DO have to re-install your OS, you're prepared to do so.
And before you upgrade, create a USB stick with every single up to date driver for your new install ready to go, so that you don't have to mess around with finding them later.
*edited to change style of "MAY" to bold / underline, and added underline to "Absolutely not" for additional clarification.