There's still a lot we don't understand about how planets form.
There's a lot we do! Clouds of gas and dust collapse, flattening out as they spin to form disks that can be many hundreds of billions of kilometers across. In the center the material becomes the star, and farther out planets begin to form as tiny grains of dust clump together to form fluffy pebbles, then boulders, then mountains… growing in size until they reach planetary status.
I've left out some details, obviously, but we're getting a good handle on the overall picture as well as filling in the gaps.
But there're still some nagging holes in the story that are just now coming to light. For example, close in to the star — out to, say, ten or more billion kilometers — the disk tends to be fairly symmetric, and planets growing in it can carve gaps and rings as their gravity influences the material there.
Outside of that, though, it gets harder to see what's going on. Dust gets faint, and gas is cold. Surveys that take short looks at systems don't see deep enough to get the details needed for more understanding.
And sometimes when a ...