  The scaling relations between the gas content and star formation rate of
galaxies provide useful insights into processes governing their formation and
evolution. We investigate the emergence and the physical drivers of the global
Kennicutt-Schmidt (KS) relation at $0.25 \leq z \leq 4$ in the cosmological
hydrodynamic simulation NewHorizon capturing the evolution of a few hundred
galaxies with a resolution of $\sim$ 40 pc. The details of this relation vary
strongly with the stellar mass of galaxies and the redshift. A power-law
relation $\Sigma_{\rm SFR} \propto \Sigma_{\rm gas}^{a}$ with $a \approx 1.4$,
like that found empirically, emerges at $z \approx 2 - 3$ for the most massive
half of the galaxy population. However, no such convergence is found in the
lower-mass galaxies, for which the relation gets shallower with decreasing
redshift. At the galactic scale, the star formation activity correlates with
the level of turbulence of the interstellar medium, quantified by the Mach
number, rather than with the gas fraction (neutral or molecular), confirming
previous works. With decreasing redshift, the number of outliers with short
depletion times diminishes, reducing the scatter of the KS relation, while the
overall population of galaxies shifts toward low densities. Using pc-scale star
formation models calibrated with local Universe physics, our results
demonstrate that the cosmological evolution of the environmental and intrinsic
conditions conspire to converge towards a significant and detectable imprint in
galactic-scale observables, in their scaling relations, and in their reduced
scatter.
