Unclear what you downloaded (a new update from a web distributor which was cheaper than the full version from Microsoft).

Now download the official version (use the "install to another PC" option) from https://www.microsoft.com/en-us/software-download/windows10 (assuming you want the US version), and make a bootable USB-stick or DVD. That's free for everybody.

If your previous version of Windows was legitimate, you don't need a license code to install this one, because Microsoft knows that your PC has a valid one already. If it was some hacked version, you'll have to buy the license key indeed.