Well, this world basically made itself. When a large star comes to the end of its life, it explodes releasing lots of "cosmic dust". All the elements come from hydrogen originally. Stars are like a chemical factories. They use hydrogen as fuel and produce all the other elements. So when the thing explodes, all this material gets blasted out, forming a giant dust cloud. Over millions of years, those dust particles start to clump together. From dust, to stones, to larger rocks, to mountain sized rocks, to country sized rocks, and eventually, to planets. So the idea is before our solar system was here, there was some huge star that exploded, creating a dust cloud which all the planets and moons formed from.
Atleast that's how I understand it from watching a few space documentaries lol.