  Gas inflow into galaxies should affect the star formation and hence the
evolution of galaxies across cosmic time. In this work, we use TNG100 of the
IllustrisTNG simulations to understand the role of environment on gas inflow
rates in massive galaxies at z >= 2. We divide our galaxies (log(M*/Msolar )>=
10.5) into cluster (log Mhalo/Msolar >= 13) and field (log Mhalo/Msolar < 13)
galaxies at z = 2 and further divide into centrals and satellites. We track
their gas inflow rates from z = 6 to 2 and find that the total gas inflow rates
of satellite galaxies rapidly decline after their infall into cluster halos and
as they reach the cluster center. At z = 2, the gas inflow rate of cluster
satellite galaxies is correlated with the cluster-centric radii and not the
host halo mass. In contrast, the gas inflow rate in centrals is strongly
correlated with the host halo mass at z >= 2. Our study indicates that between
redshifts 6 to 2, the gas that normally is accreted by the satellite galaxies
is redirected to the center of the cluster halo as inflows to the cluster
centrals and forming the intra-cluster medium. Our analysis suggest that the
inequality of gas accretion between massive satellite and central galaxies is
responsible for the starvation of cluster satellite galaxies that evolve into
the massive quenched cluster galaxies observed at z<0.5.
