Why do stars have almost the same relative abundances of helium, but different abundances of heavier elements?

The helium content in stars is practically the same, as it is determined mainly by thermonuclear fusion in the first minutes of the Big Bang. The formation of heavy elements occurred as a result of local synthesis during the evolution of specific stars.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.