Just make a backup of your user preferences folder. It's in %appdata%\Blender Foundation\Blender\
(You can copy-paste that into Windows run menu(WinLogo + R) or file explorer's address bar). Full path is usually C:\Users\[your user name]\AppData\Roaming\Blender Foundation\Blender
, but AppData folder is hidden by default in Windows. There should be folders for whatever versions of Blender you have installed. It's not a bad idea to have a backup of that in any case. So if you accidently save preferences, or have Auto-Save Preferences enabled after loading factory settings you can delete that folder and replace it with your backup.
Disabling Auto-Save Preferences might be a good idea if you often need Blender with factory settings. I do recommend having a backup in any case.