  The star formation history of a galaxy is modulated by a plethora of internal
processes and environmental conditions. The details of how these evolve and
couple together is not fully understood yet. In this work, we study the effects
that galaxy mergers and morphological transformations have on setting different
modes of star formation at galactic scales and across cosmic time. We monitor
the global properties of VINTERGATAN, a 20 pc resolution cosmological zoom-in
simulation of a Milky Way-type galaxy. Between redshifts 1 and 5, we find that
major mergers trigger multiple starburst episodes, corresponding to a tenfold
drop of the gas depletion time down to 100 Myr. Bursty star formation is
enabled by the emergence of a galactic disc, when the rotational velocity of
gas starts to dominate over its velocity dispersion. Coherent motions of gas
then outweigh disordered ones, such that the galaxy responds to merger-induced
forcings by redistributing large amounts of gas towards high densities. As a
result, the overall star formation rate is enhanced with an associated decrease
in the depletion time. Before redshift 5, mergers are expected to be even more
frequent. However, a more turbulent interstellar medium, is incapable of
reacting in such a collective manner so as to spark rapid star formation. Thus,
a constant long depletion time of 1 Gyr is kept, along with a low, but
gradually increasing star formation rate. After the last major merger at
redshift 1, VINTERGATAN spends the next 8 Gyr evolving secularly. It has a
settled and adiabatically growing disc, and a constant star formation rate with
gas depletion times of 1-2 Gyr. Our results are compatible with the observed
rapid transition between different modes of star formation when galaxies leave
the main sequence.
