DarienG :
the old computer was a laptop I bought at best buy. It came with windows, I didn't buy windows with it. so can I transfer the license?
"It came with Windows"
Yes you did buy windows with it. It was not free. Just not a specific line item on the bill.
And you can't transfer that OS to another PC. That is the licensing agreement you agreed to when you used that OS license.
You bought an OEM license,
which is licensed to that laptop motherboard. If you wish to build a new PC...that PC needs its own OS license.
Either Windows (not free), or Linux (free).
Put the old laptop on craigslist for $100. If it actually works, someone will be along quickly to buy it. Use that $100 to buy a valid OS for the new desktop.