Free-floating, “rogue” planets that don’t orbit a star can form on their own outside a solar system.
Astronomers observed the Rosette Nebula which is filled with tiny clouds called “globulettes”. They believe these globulettes collapse under their own weight and form free-floating planets.
Traditionally, scientists believed rogue planets were formed within and then ousted from an existing solar system.
Read more at Chalmers University of Technology