Somewhere on the layout config screen there should be an opton to save it as a custom layout (will save it for this specific game), or as a preset (can be loaded up for any game).
The path Google/Reddit had was invalid, but there was a cache file there that helped me locate the actual directory (at least for my Steam Deck) and identify which layout goes with which game.
The path I found was: /home/deck/.steam/root/steamapps/common/Steam Controller Configs/{USER_ID}/config/