  We investigate the fueling mechanisms of supermassive black holes (SMBHs) by
analyzing ten zoom-in cosmological simulations of massive galaxies, with
stellar masses $10^{11-12} M_{\odot}$ and SMBH masses $10^{8.9-9.7}$ at $z=0$
and featuring various major and minor merger events. By tracing the gas history
in these simulations, we categorize the gas accreted by the central SMBHs based
on its origin. Gas that belonged to a different galaxy before accretion onto
the BH is labeled as (1) ``external," while smoothly accreted cosmic gas is
classified as (2) ``smooth." Gas produced within the primary halo through
stellar evolution and subsequently accreted by the SMBH is classified as (3)
``recycled." Our analysis, which included stellar feedback, reveals that the
primary fuel source for SMBHs is the recycled gas from dying stars. This
recycled gas from stars in the inner region of the galaxy readily collapses
toward the center, triggering starbursts, and simultaneously fueling the SMBH.
Galaxy mergers also play a crucial role in fueling SMBHs in massive galaxies as
SMBHs in massive halos tend to accrete a higher fraction of external gas from
mergers compared to smoothly accreted gas. However, on average, it takes
approximately 1.85 Gyr for external gas to enter the main galaxy and accrete
onto the SMBH. Considering the presence of various other gas triggers for AGN
activity alongside this time delay, the association between AGN and mergers may
not always be obvious.
