Answer: A protoplanetary disk.
Step-by-step explanation:
The first thing that was formed, is the Sun, where most of the mass collapsed by the gravitational force and formed the star in the center.
After that, the rest formed something called a "protoplanetary disk", which is a rotating disk (as the name implies) of dust and dense gas which rotates around a newly generated star (in this case, there are protoplanetary disks formed around other types of stars, like a T Tauri Star).
Now, this protoplanetary disk will evolve into a planetary system, (planets, asteroids, moons, etc)