  Accretion of stars on massive black holes (MBHs) can feed MBHs and generate
tidal disruption events (TDEs). We introduce a new physically motivated model
to self-consistently treat TDEs in cosmological simulations, and apply it to
the assembly of a galaxy with final mass $3\times 10^{10}\mathrm{\, M}_\odot$
at $z=6$. This galaxy exhibits a TDE rate of $\sim 10^{-5}\mathrm{\, yr}^{-1}$,
consistent with local observations but already in place when the Universe was
one billion year old. A fraction of the disrupted stars participate in the
growth of MBHs, dominating it until the MBH reaches mass $\sim 5 \times 10^5
\mathrm{\, M}_\odot$, but their contribution then becomes negligible compared
to gas. TDEs could be a viable mechanism to grow light MBH seeds, but fewer
TDEs are expected when the MBH becomes sufficiently massive to reach the
luminosity of, and be detected as, an active galactic nucleus. Galaxy mergers
bring multiple MBHs in the galaxy, resulting in an enhancement of the global
TDE rate in the galaxy by $\sim 1$ order of magnitude during $100\mathrm{\,
Myr}$ around mergers. This enhancement is not on the central MBH, but caused by
the presence of MBHs in the infalling galaxies. This is the first self
consistent study of TDEs in a cosmological environment and highlights that
accretion of stars and TDEs are a natural process occurring in a Milky~Way-mass
galaxy at early cosmic times.
