How galaxies assemble masses through their own star formation or interaction with the external environment is still an important topic in the field of galaxy formation and evolution. We use Value Added Catalogs with galaxy features that are spatially and temporally resolved from Sloan Digital Sky Survey Data Release 17 to investigate the mass growth histories of early-type galaxies (ETGs) and late-type galaxies (LTGs). We find that the mass growth of ETGs is earlier than that of LTGs for massive galaxies (M * > 1010 M ⊙), while low-mass (M * ≤ 1010 M ⊙) ETGs have statistically similar mass assembly histories as low-mass LTGs. The stellar metallicity of all massive galaxies shows a negative gradient and basically does not change with time. However, in low-mass galaxies, the stellar metallicity gradient of elliptical galaxies is negative, and the stellar metallicity gradient of lenticular and spiral galaxies evolves from positive to negative. ETGs are not all in a high-density environment, but exhibit mass dependence. As the tidal strength increases, the star formation rate of low-mass ETGs rapidly decreases. These results support a picture where massive galaxies exhibit inside-out quenching mode, while low-mass galaxies show outside-in quenching mode. Environmental effects play an important role in regulating the mass assembly histories of low-mass ETGs.