Unsure of what platform you are running (and this will not help you with already corrupted files), but: at least for Windows 10/11, you can get Windows to make automatic backups to a (dedicated) disk automatically. It will keep multiple versions of the files by default, so if a file has gotten corrupt you should in theory have an older 'version' that is not corrupted. It's called 'File History', and is located in 'Control Panel', but using the search function on your taskbar works as well. It does require a dedicated disk (like an external) that needs to be permanently attached (so an external drive will work for a dedicated desktop, but probably not so much for a laptop/notebook). By default it will only create backups for default 'Libraries' (like your 'Documents' and 'Download' folders), but you can create a new 'Library' and make it backup those as well with some effort.