The word "stench" refers to a bad smell. This describes the Ammonites as something unpleasant and unwanted. Alternate translation: "realized that they had become repulsive to David" or "realized that they had angered David" (See: [[rc://en/ta/man/jit/figs-metaphor]])