Before taking them outside for a walk, get your new puppy familiar with a leash in a safe environment.
Once they get familiar with their new surroundings and build confidence, the problem will be solved naturally.
Make the walks shorter and introduce a different type of play at home once your pup is well-rested again.
You can carry around some high-value treats and a clicker for rewarding wanted behavior.
Repetition is the mother of all learning, so the more you repeat this, the better your dog will get.