We are told that all the planets and stuff in the solar system, including comets and asteroids, coalesced from the debris of an extinct star that went nova or supernova at some remote time in the past.
Are there rocks in the center of stars? Solids I’m sure, like heavy metals and lots of Hydrogen gas.
Yet the gas giants are full of methane, ammonia, some amount of water and lots of other minor gases.
Comets are described as ‘dirty snowballs’.
We are told that the asteroid belt is a planet the didn’t quite make it due to lack of mass.
So, where did the ‘rocks’ come from that made the asteroids and the inner planets?................
you have some good questions. Stars are mostly hydrogen and helium. Heavier elements up to iron are created in heavy stars as they age. Finally heavy stars explode in a super nova and create the elements beyond iron. So yes old stars create all the elements which make rocks, asteroids, comets, and planets. We are made of star stuff.