Void galaxies are essential for understanding the physical processes that drive galaxy evolution because they are less affected by external factors than galaxies in denser environments, that is, in filaments, walls, and clusters. The stellar metallicity of a galaxy traces the accumulated fossil record of the star formation through the entire life of the galaxy. A comparison of the stellar metallicity of galaxies in various environments, including voids, filaments, walls, and clusters can provide valuable insights into how the large-scale environment affects the chemical evolution of the galaxy. We present the first comparison of the relation of the total stellar mass versus central stellar metallicity between galaxies in voids, filaments, walls, and clusters with different star formation history (SFH) types, morphologies, and colours for stellar masses between $10^{8.0}$ to $10^{11.5}$ solar masses and redshift $0.01Comment: Accepted in A&A, 39 pages, 18 figures, 24 tables. Language corrected version. Title change and tables correction