Go through doors and gates first
It's much easier to do this while a puppy is small and slower!
Doorways and thresholds - in and outside the home - are points that your dog will seek to control, to control access from one place to another, to dictate the direction of movement and to control that 'resource'.
Controlling these thresholds will also set up really nice manners, of restraint and impulse control that can be so useful in other parts of life.
Set up the strong foundations of a well functioning pack order for your puppy while it's easier by making sure humans go through doors, gates and thresholds before the dog.
If you need more help controlling thresholds, get in touch!