  Nuclear star clusters (NSCs) are the densest stellar systems in the Universe
and are found in the centres of all types of galaxies. They are thought to form
via mergers of star clusters such as ancient globular clusters (GCs) that
spiral to the centre as a result of dynamical friction or through in-situ star
formation directly at the galaxy centre. There is evidence that both paths
occur, but the relative contribution of either channel and their correlation
with galaxy properties are not yet constrained observationally. We aim to
derive the dominant NSC formation channel for a sample of 25 nucleated
galaxies, mostly in the Fornax galaxy cluster, with stellar masses between
$M_\rm{gal} \sim 10^8$ and $10^{10.5} M_\odot$ and NSC masses between
$M_\rm{NSC} \sim 10^5$ and $10^{8.5} M_\odot$. Using Multi-Unit Spectroscopic
Explorer (MUSE) data from the Fornax 3D survey and the ESO archive, we derive
star formation histories, mean ages and metallicities of NSCs, and compare them
to the host galaxies. In many low-mass galaxies, the NSCs are significantly
more metal-poor than the hosts with properties similar to GCs. In contrast, in
the massive galaxies, we find diverse star formation histories and cases of
ongoing or recent in-situ star formation. Massive NSCs ($> 10^7 M_\odot$)
occupy a different region in the mass-metallicity diagram than lower mass NSCs
and GCs, indicating a different enrichment history. We find a clear transition
of the dominant NSC formation channel with both galaxy and NSC mass. We
hypothesise that while GC-accretion forms the NSCs of the dwarf galaxies,
central star formation is responsible for the efficient mass build up in the
most massive NSCs in our sample. At intermediate masses, both channels can
contribute. The transition between these formation channels seems to occur at
galaxy masses $M_\rm{gal} \sim 10^9 M_\odot$ and NSC masses $M_\rm{NSC} \sim
10^7 M_\odot$.
