All alkalis produce hydroxide ions when dissolved in water. How do we write the chemical equation for aqueous ammonia?

I see some textbooks write it as ammonia gas dissolving in water to form ammonium ions and hydroxide ions.

NH3(g)+ H2O(l) ==> NH4+(aq) + OH-(aq)

What you see in those text books is correct. I don't know if your confusion stems from the older definition of NH3 or not but here it is for what it's worth. In the older days (when I was in school), it was thought that NH3 gas dissolved in water to form NH4OH as follows:

NH3 + HOH ==> NH4OH.
Then, NH4OH ionized (partially since it is a weak base) to form the following:
NH4OH <==> NH4^+ + OH^- and we went with that thought for many many years. It has been shown, however, (and I don't know the exact date but I think it was sometime in the 1960s or 1970s) that NH4OH does NOT exist. Therefore, ammonia may be described as a base by both the modified Arrhenius definition as well as the Bronsted-Lowry theory.
By the modified Arrhenius we say a substance is a base if it produces OH- in solution. NH3 does this by
NH3 + HOH ==> NH4^+ + OH^-.
By the Bronsted-Lowry theory, a base is a proton acceptor. NH3, remember, has a pair of unshared electrons, shown here as :NH3 + HOH ==> NH4^+ + OH^-. Note that the :NH3 has accepted a proton (from water); thus, NH3 is a base and water is an acid. The reaction forms a conjugate acid (NH4^+) and a conjugate base (OH^-). I still see some reference now and then about NH4OH and it's ionization into NH4^+ and OH^- but the part about the existence of NH4OH is not true.

To write the chemical equation for aqueous ammonia, you need to consider how ammonia (NH3) reacts when it dissolves in water (H2O).

Ammonia is a gas, so it first needs to be indicated in its gaseous state. The reaction can be represented as NH3(g) + H2O(l), where (g) indicates the gas state and (l) indicates the liquid state of water.

When ammonia gas dissolves in water, it forms ammonium ions (NH4+) and hydroxide ions (OH-). This is due to the reaction of the ammonia molecule with water molecules to produce these ions. Therefore, we add the formation of NH4+ and OH- ions to the equation.

The final balanced chemical equation for aqueous ammonia can be written as:
NH3(g) + H2O(l) → NH4+(aq) + OH-(aq)

Here, (aq) represents the aqueous state, which means that the particles are dissolved in water.