AMS stands for ammonium sulfate. When using spray-grade AMS, it is typically added to the water before the herbicide. Once in the tank, AMS dissociates into ammonium and sulfate ions. The sulfate portion helps tie up hard-water cations such as calcium, magnesium, iron, and other positively charged ions that may be present in the water.
If AMS is not used, those hard-water ions can bind with herbicides like glyphosate and reduce their effectiveness. This is especially important with glyphosate because it is very prone to antagonism from hard water.
This should not be confused with a surfactant. AMS is mainly used for water conditioning and to help improve herbicide performance in hard water. A surfactant, on the other hand, helps reduce surface tension so the spray droplet spreads more evenly across the leaf surface. Many agricultural surfactants are also designed to improve spreading, sticking, wetting, and sometimes penetration through different leaf surfaces, especially waxy leaves.
The Dawn dish soap analogy makes sense to a point because dish soap can reduce surface tension, but it is usually not as effective or consistent as a proper agricultural surfactant. Ag surfactants are designed help beyond just surface tension reduction.
A common spray order would be: fill the tank with water, add AMS and agitate, then add glyphosate and the proper surfactant if not a blended product.
I hope this helps.