Use the Launcher (a the bottom toolbar) Config > Backup Tool > Backup and save that somewhere. That will back up the client UI Settings - including hotbars, HUD layout and character configuration.

For the game application itself, you can copy the whole game folder - wherever it is currently installed to.

After reinstalling your OS, you may want to make sure you have up to date graphics driver and Direct X 9.0c installed before launching the game. You then can restore your user settings from where you saved to from earlier backup step.