  We combine the latest observationally motivated constraints on stellar
properties in dark matter haloes, along with data-driven predictions for the
atomic (HI) and molecular (H$_2$) gas evolution in galaxies, to derive
empirical relationships between the build-up of galactic components and their
evolution over cosmic time. At high redshift ($z \gtrsim 4$), the frameworks
imply that galaxies acquire their cold gas (both atomic and molecular) mostly
by accretion, with the fraction of cold gas reaching about 20% of the cosmic
baryon fraction. We infer a strong dependence of the star formation rate on the
H$_2$ mass, suggesting a near-universal depletion timescale of 0.1-1 Gyr in
Milky Way sized haloes (of masses $10^{12} \ M_{\odot}$ at $z = 0$). There is
also evidence for a near-universality of the Kennicutt-Schmidt relation across
redshifts, with very little dependence on stellar mass, if a constant
conversion factor ($\alpha_{\rm CO}$) of CO luminosity to molecular gas mass is
assumed. Combining the atomic and molecular gas observations with the stellar
build-up illustrates that galactic mass assembly in Milky-Way sized haloes
proceeds from smooth accretion at high redshifts, towards becoming
merger-dominated at late times ($z \lesssim 0.6$). Our results can be used to
constrain numerical simulations of the dominant growth and accretion processes
of galaxies over cosmic history.
