Hi Sanderson96 -
I'm Kevin B. Independent advisor and a Windows user like you. I do apologize for the inconvenience that you experiencing right now, let me help you sort things out.
Is the windows 10 came pre-installed on your computer? If so, then changing the hardware should reactivate your windows. Please see the link below.
https://support.microsoft.com/en-us/windows/rea...
For your question, Once you purchase the key from the Microsoft Store, you will not re-install the OS again, it should automatically activate your windows.
Hope this will help and have a bless day!
Thanks.
Kevin B.
Independent advisor