The Sun formed from a giant cloud of gas and dust called a
nebula. When this nebula collapsed under its own gravity, it also gave birth to the
entire solar system, including the planets, asteroids, comets, and other celestial objects.
So, it's not accurate to say anything was formed *at the same time* as the Sun. The Sun's formation triggered the formation of everything else in the solar system. This process took millions of years.