  Observations of the cosmic evolution of different gas phases across time
indicate a marked increase in the molecular gas mass density towards $z\sim
2-3$. Such a transformation implies an accompanied change in the global
distribution of molecular hydrogen column densities ($N_{\rm{H_2}}$). Using
observations by PHANGS-ALMA/SDSS and simulations by GRIFFIN/IllustrisTNG we
explore the evolution of this H$_2$ column density distribution function
[$f(N_{\rm{H}_2})$]. The H$_2$ (and HI) column density maps for TNG50 and
TNG100 are derived in post-processing and are made available through the
IllustrisTNG online API. The shape and normalization of $f(N_{\rm{H}_2})$ of
individual main-sequence star-forming galaxies are correlated with the star
formation rate (SFR), stellar mass (${M_*}$), and H$_2$ mass ($M_{\rm{H}_2}$)
in both observations and simulations. TNG100, combined with H$_2$
post-processing models, broadly reproduces observations, albeit with
differences in slope and normalization. Also, an analytically modelled $f(N)$,
based on exponential gas disks, matches well with the simulations. The GRIFFIN
simulation gives first indications that the slope of $f(N_{\rm{H}_2})$ might
not majorly differ when including non-equilibrium chemistry in simulations. The
$f(N_{\rm{H}_2})$ by TNG100 implies that higher molecular gas column densities
are reached at $z=3$ than at $z=0$. Further, denser regions contribute more to
the molecular mass density at $z=3$. Finally, H$_2$ starts dominating compared
to HI only at column densities above log($N_{\rm{H}_2} / \rm{cm}^{-2}) \sim
21.8-22$ at both redshifts. These results imply that neutral atomic gas is an
important contributor to the overall cold gas mass found in the ISM of galaxies
including at densities typical for molecular clouds at $z=0$ and $z=3$.
