  Supermassive black holes (BH) at the centres of galaxies can rapidly change
their mass and spin by gas accretion and mergers. Using hydrodynamical
cosmological simulations, with prescriptions for BH growth and feedback from
Active Galactic Nuclei, we study how the evolution of BH mass growth is driven
by gas accretion and mergers. Using a semi-analytical approach to evolve spins,
we also highlight the mechanisms responsible for driving the magnitude and the
direction of spins as a function of cosmic time. We find that in the
high-redshift universe galaxies maintain large values of gas accretion onto
BHs, which therefore is the main driver of their mass and spin evolution.
Sustained accretion of cold gas at high-redshift tends to align BH spins with
the angular momentum of the surrounding gas and maximise their magnitude.
Conversely, at low redshift, as BHs get more massive and galaxies more
gas-poor, the contribution from binary coalescences to the total BH mass growth
increases, especially at the high-mass end, and tends to decrease the magnitude
of spins and change their direction.
