There are variations in the abundance of elements even within our own Solar System. We use those variations to determine if certain objects formed near each other or far apart. Most of everything in our solar system is inside the Sun, over 99%. The remaining scraps went to form the planets.
Other solar systems would have different amounts of different elements depending on how close they were to the supernovas that seeded the gas clouds that formed those solar systems. For example, our solar system apparently is very abundant in phosphorous, which is the basis of the energy transport systems in all life on our planet, ATP is the energy transport system of life (the P in the ATP molecule stands for phosphorous). Phosphorous is mainly formed in very specific kinds of supernova, not all of them. So certain solar systems, which formed from supernovas without phosphorous production may not have any life on them, even if they have planets in the habitable zone.