tl;dr: Make sure your old OS is compatible with the new hardware.
I just upgraded my PC from an AMD Phenom II 965 (AM3 Socket) with Windows 7 with an ASUS mobo (I forget the model) to an ASUS Prime X470 Pro mobo and a Ryzen 5 2600.
My old 1TB and 2TB drives were still working fine, so I just moved them over to the new MOBO. Come to find out... AMD doesn't support Windows 7 on the Ryzen CPUs. There are a couple ways around it and I tried all of them. They either didn't work, or I didn't have what I needed to do it (like a windows 7 boot drive).
So I ended up just upgrading to Windows 10, but was forced to go to Best Buy and Buy it (blegh... $150 for Windows 10 Home 64bit...)
Microsoft allows anyone to download Windows 10 for free and install it without a product key. It’ll keep working for the foreseeable future, with only a few small cosmetic restrictions. And you can even pay to upgrade to a licensed copy of Windows 10 after you install it.