To reinstall windows but keep your personal files you use the following command:-
1)Type and search [Reset this PC] in the Windows search bar, then click [Open]
2)In the Reset this PC field, click [Reset PC].
3)Select [Keep my files].
4)Select [Local reinstall]. ...
5)Click [Change settings]
6) Set the [Restore apps and settings which came with this PC] option as Yes, then select [Confirm]
Hope it helps