You might want to bookmark the following page for reference, because for example it tells you where the custom keyboard shortcut settings files are stored (along with the locations of many other settings):
Preference file functions, names, locations | Photoshop
Open that page and scroll down to the Windows section, in the part of the table where the first column says “Keyboard Shortcuts Preferences - Contains the user defined settings in the Keyboard Shortcuts dialog.” If you look to the right of that, it says that the settings file, with a .psp filename extension, is stored at:
Users\[user name]\AppData\Roaming\Adobe\Adobe Photoshop [version]\Adobe Photoshop [version] Settings
If you already back up your entire computer regularly, then all you have to do is locate a previous version of your keyboard shortcut settings from that path location in the backup, and restore that to the same location on your computer.
After you’ve restored your settings file to that path location, it should show up in the Set menu in the Keyboard Shortcuts and Menus dialog box so that you can apply it again.