Studying the tiny stretches of molecules in the lab, to unravel space mysteries

Even though the density of molecules in space can be incredibly low, the immense timescales of the universe allow these molecules to eventually meet and interact. But how does this lead to the formation of new planets?