If needed (and it probably will be), you do the reinstall
after the major hardware change.
So...you prepare for this.
ASsuming your system still works(?), you gather allt he stuff needed.
The OS, here:
https://www.microsoft.com/en-us/software-download/windows10
You'll need a 5GB or larger USB stick for this
Drivers. Find all the drivers for your hardware (GPU, keyboard, LAN). Save these to another USB stick.
Document all the username/passwords for your accounts and applications
Applications...know where to go and download the install files for whatever applications you use.