How does salt work to bring out all the other flavours in food?
Salt draws out water and liquid in the process called osmosis where an area with high amounts of moisture gets transferred to another area with little to no moisture. As flavours are moisture based in cooking the same principle is applied. Think of it like shaking treats to a dog, the dog will run to the room with treats and leave the previous room that had non behind
So taste is a very complex phenomenon, dozens of different molecules are interactions with your taste receptors. Taste is not just a result of which molecules are present, but the relative abundance in the mix. Increasing the salt content will make volitile compounds evaporate more readily, and it is often these volitile compounds that make of the flavor molecules of our food. So, increased salt means more flavor molecules on your receptors.
Beyond that, flavors have an intermixing affect. Sour flavor will enhance bitter flavor in low concentrations, but in high concentrations sour will decrease bitter flavors. Salt is similar, and at low concentrations it will decrease the perception of bitterness but increase sweet, sour, and umami perception (hence the pinch of salt in cookies). In higher concentration, salt will suppress sweetness while still enhancing umami (which is why we salt steaks and other meats). [Source](https://www.sciencefocus.com/science/why-does-salt-enhance-flavour/)