Maybe this is how our solar system was formed the sun exploded because of a large star then clouds of dust came...
(Just a normal day until the death of a red super giant) When a large star runs out of fuel gravity will collapse the star to quickly that it will create a massive explosion called SUPERNOVA
The remains of a supernova are large clouds of dust and gas called an intersteller cloud.
The clouds of dust will eventually find it's way to nebula causing huge clumps of materials (gas, helium)
Intersteller clouds wil form all over full of dust and gas.
all the planets...
But before any of this it could only happen if the clumps began to form a spinning disk that would soon become the sun. Materials would began to orbit around the spinning disk then the materials will start to form objects like planets and moons