The only sensible rule when working with units is, that you can only add together terms which carry the same unit.
Say $ [x]=[y] $, then $x+y$ is unit-wise a valid statement. You may also multiply arbitrary units together. Whether that is physically sensible is another question. Obviously you cannot add, e.g meters and seconds, but multiplying to form $m/s$ as a unit for velocity is a valid operation.
From that follows, that the argument of the exponential must not carry a unit, because the exponential is defined as a power series.
$$ e^x =\sum_{n=0}^\infty \frac{x^n}{n!}$$ If $x$ were to carry a unit, say meters, one would add (schematically) $m+m^2+m^3+\cdots$, which is nonsenical.
If you encounter an exponential, a sine/cosine, logarithm,... in physics you will find almost always that its argument, which must be dimensionless, is a product of often two conjugate variables. Examples are time and frequency, or distance and momentum.