As insurance make a full backup of just the note data and attachments. File > Export All > JEX - Joplin Export File. You should not need it but it's best to be cautious.
If using the portable version just copy the executable and the profile folder that is with it to somewhere safe. The profile folder contains the note data, config files, custom css and plugins. Put them back after the Windows reinstallation ensuring that the executable and profile folder are together.
For the desktop version copy C:\users\<username>\.config\joplin-desktop to somewhere safe. This folder contains the note data, config files, custom css and plugins. Reinstall Windows. Copy the joplin-desktop folder back to C:\users\<username>\.config\joplin-desktop (you may have to also create the .config folder). Install Joplin. Run Joplin and it should detect and use the joplin-desktop folder. If Joplin is using the Windows Keychain (Keychain Supported: Yes) you will have to enter your sync password on the sync settings page and if you are also using E2EE you will have to enter your master password when prompted.
I edited the post to include this information however that may not be visible to you if you are viewing an email notification. See the post on the forum.