To reinstall Windows 10 without losing programs, use a third-party tool to create a backup of your drive:
Download, install, and launch Disk Drill.
Create a byte-to-byte backup of your drive on a separate storage device.
Reinstall Windows 10.
Run Disk Drill and connect your storage device.
Select your backup in the Disk Drill menu and click Search for lost data.