There are no large bodies with gravity YET and so nothing to slow the particles down from moving in a straight line.
Collisions with each other.
The particles could continue to move in this straight line for infinity ,but somehow they start to move in orbits ?????
Orbits come long, long after particles have begun to clump together into hydrogen atoms.
They don't just "start" to move in orbits. Objects that intersect the gravity wells of massive objects at the correct distance and vector enter orbits. Other things don't and they shoot off into space.
It's hard to understand what you find puzzling about that. When you look at objects in orbit, you're obviously only seeing the objects that had the correct position and speed to enter orbit in the first place. Obviously, everything that
didn't never entered an orbit, so you don't see it when you look at orbits.
What's hard to grasp about that?