Either you are performing a new installation or re-installing an operating system that you already possess and you are unable to activate it here is a manual way to do it.
This process does not need any third-party application rather we are only going to use the ever reliable and useful CMD app that is built-in in every version of Windows Operating System.
So, let's begin.
STEP 1: In search menu or Cortana type CMD, right click it then choose "Run as administrator"
STEP 2: We need to remove any existing product key (in case you used a trial key; which is always the case if your operating system is a paper license where your operating system is downloaded from Microsoft), enter and run the command slmgr.vbs /upk by pressing enter key.
STEP 3: We need to clear the product key from registry by running slmgr.vbs /cpky then press enter.
STEP 4: After deleting the product key you need to enter your new product key, use the command: slmgr.vbs /ipk xxxxx-xxxxx-xxxxx-xxxxx where the x’s are your actual product key then press enter.
5th AND FINAL STEP: Activate Windows by entering the command slmgr.vbs /ato then press enter (Windows will be instantly activated).
That's it, it is done.
NOTE: If activation is not reflecting immediately on you computer's settings you may need to restart your computer to refresh it.