Short answer: settings including action palette actions (i.e. actions that you haven’t exported to separate files), window layout, etc. are located in:
Mac: Users/<username>/Library/Preferences/Adobe Photoshop <version> Settings
Windows: C:\Users\<username>\AppData\Roaming\Adobe\Adobe Photoshop <version>\Adobe Photoshop <version> Settings
(For future reference, we are currently at Photoshop 2021, version 22.1)
The relevant Adobe help page is this (at the bottom). It is slightly confusing because if you look up where actions etc. are stored, you’ll find a different location. That location is where actions saved as a file (and e.g. actions you may download from the internet) go.
I simply used Time Machine to restore the settings files. Adobe doesn’t create a backup for you, so if you don’t use Time Machine or another regular backup solution, you may be out of luck.
I had a show-stopping issue with the latest version of Photoshop, and a lot of work to do that I couldn’t get done because of it. The issue is discussed here, but isn’t specifically relevant to this post other than that the current solution is to go back to the previous version of Photoshop (I went back to 22.0.1 from 22.1).
That Adobe allows you to easily do that is great, and of course makes sense because issues like this will happen. The problem with this ability, though, is that while when you install an update all your settings carry forward, when you downgrade your settings are lost.
I don’t make a ton of customizations, but I like the cursor options a certain way, the windows laid out a certain non-standard way, all the tools I use are at the settings I like, and I create custom actions regularly. I could very easily set everything up again in just a few minutes, and simply re-create any actions as I need them.
However, I was annoyed that the settings were lost, so that was the primary motivation for finding how to restore them rather than the inconvenience of having to re-do everything itself. I’m writing this because others have much more customization, so perhaps this will help someone.
My solution to restore the lost settings was simply macOS Time Machine, which works even if you haven’t done a full Time Machine backup in a while because it keeps local snapshots (as space permits, so you’ll want to do it as quickly as possible). Simply browse to the folder and click “Enter Time Machine” from the Time Machine status bar icon and restore from there (can just restore the entire folder).