Sol is a third-generation star, I've read, because it and the Earth contain gold, for instance, which cannot be produced by first- and second-generation stars.
From that example and many other factors, the age of the solar system can be deduced.
that is very interesting! i had no idea!
Actually it's not entirely true.
The standard model of heavy-element production, which includes everything beyond iron, is that a star which goes supernova slams existing elements -- up to iron -- together enough to fuse them into heavier elements; the heavier the element, the more energy that requires, generally. That's called the r-model, for "rapid": boom, and you have new elements.
There were supernovas among first-generation stars, so they could have (probably did) made heavier elements. The second generation stars were far more likely to do so, however, having already started with some heavy elements, which in such an explosion would get fused to make even heavier elements -- so the supernovae they produced gave off material which, when formed into third-generation stars, came with sufficient heavy elements to actually form substantive planets.
BUT -- and this is fun -- stellar physicists have discovered another way that heavy elements get made; they call it the s-model, for "slow". It happens because the pressures are so intense inside a certain kind of star that pre-iron elements can actually stick together on occasion to make post-iron elements. This won't yield things like iron+oxygen --> selenium; the energies required to fuse two large nuclei are enormous. But iron+hydrogen --> cobalt, iron+helium --> nickel, and others involving one heavy nucleus and one light, are apparently possible -- the physics works, and there are stars with chemical compositions which admit no other explanation.
A secondary s-model process happens when heavy elements from other stars drift into the atmosphere of the right kind if star: they do a cute little dance that produces stars with -- of all things! -- a lot of lead (two-and-a-half times as heavy as iron) drifting around in their outer envelopes.
Just as a side note, the r-model process leaves stars with massive amounts of iron, because that's what everything lighter cooks into before the star goes boom. Gobs of iron get flung out and become the cores of planets.
OTOH, when a star goes supernova and leaves a black hole, guess what the middle is packed with, that gets flushed down the black hole?