Indeed. And to elaborate: the random collisions which flattened the solar system (or galaxy) over billions of years all conserved angular momentum.
Minute Physics have a nice video on this: https://youtube.com/watch?v=tmNXKqeUtJM
Minute Physics have a nice video on this: https://youtube.com/watch?v=tmNXKqeUtJM
And just to clarify to GP, the original dust was not in the same plane and the video explains why it ends up in the same plane.