Why in different space objects there is almost the same relative content of helium, but different contents of heavier elements?

The content of helium (20.8%) in space bodies is the same, since it is determined by thermonuclear fusion in the first minutes of the Big Bang. The formation of heavy elements occurred as a result of local synthesis in the course of the evolution of specific stars, therefore their content is different in different cosmic bodies.

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.