  We quantified the disparity between gas-phase and stellar metallicity in a
large galaxy sample obtained from the MaNGA DR17 survey. We found that the gas
metallicity is on average closely aligned with the stellar metallicity in the
centers of intermediate-mass galaxies. Conversely, the difference is notably
larger within the center of massive galaxies. It reaches about -0.18~dex on
average for the most massive galaxies, while for low-mass galaxies, the gas
metallicity exhibits a slightly lower value than the stellar metallicity.
Moreover, the most prominent instances of a reduced gas-phase metallicity in
relation to stellar metallicity were observed within the centers of massive red
galaxies with low specific star formation rates. Because of the absence of a
correlation between the integral mass fraction of neutral gas and the disparity
between gas and stellar metallicity, we suggest that the diminished gas-phase
metallicity in the centers of massive galaxies might be attributed to the
replenishment of gas-depleted central regions through processes such as radial
gas flows or accretion from the circumgalactic medium rather than gas infall
from the intergalactic medium.
