ABSTRACT We study the mass assembly and spin evolution of supermassive black holes (BHs) across cosmic time as well as the impact of gravitational recoil on the population of nuclear and wandering BHs (wBHs) by using the semi-analytical model L-Galaxies run on top of Millennium merger trees. We track spin changes that BHs experience during both coalescence events and gas accretion phases. For the latter, we assume that spin changes are coupled with the bulge assembly. This assumption leads to predictions for the median spin values of z = 0 BHs that depend on whether they are hosted by pseudo-bulges, classical bulges or ellipticals, being $\overline{a} \sim 0.9$, 0.7 and 0.4, respectively. The outcomes of the model display a good consistency with $z \le 4$ quasar luminosity functions and the $z = 0$ BH mass function, spin values, and BH correlation. Regarding the wBHs, we assume that they can originate from both the disruption of satellite galaxies (orphan wBH) and ejections due to gravitational recoils (ejected wBH). The model points to a number density of wBHs that increases with decreasing redshift, although this population is always $\rm {\sim}2\, dex$ smaller than the one of nuclear BHs. At all redshifts, wBHs are typically hosted in $\rm {\it M}_{halo} \gtrsim 10^{13} \, M_{\odot }$ and $\rm {\it M}_{stellar} \gtrsim 10^{10} \, M_{\odot }$, being orphan wBHs the dominant type. Besides, independently of redshift and halo mass, ejected wBHs inhabit the central regions (${\lesssim}\rm 0.3{\it R}_{200}$) of the host DM halo, while orphan wBH linger at larger scales (${\gtrsim}\rm 0.5{\it R}_{200}$). Finally, we find that gravitational recoils cause a progressive depletion of nuclear BHs with decreasing redshift and stellar mass. Moreover, ejection events lead to changes in the predicted local BH–bulge relation, in particular for BHs in pseudo-bulges, for which the relation is flattened at $\rm {\it M}_{bulge} \gt 10^{10.2}\, M_{\odot }$ and the scatter increase up to ${\sim}\rm 3\, dex$.