There's a lot of misconception about when we should or shouldn't pickup our dogs.
When your dog is feeling overwhelmed, tired, or unsure about something you can certainly pick them up and comfort them! However, it's important to note that what will ensure your dog feels calm and relaxed again in the future, is to actually help them learn that they can take on their own as well, by walking away.
The reason why most of us feel the need to pickup our dogs (at least the small ones) while on walks is to remove them from a particular environment, or from being close to someone. This can be helpful in making sure we prevent an unwanted scenario.
That said each case is different and if picking up your dog doesn't provide them with comfort fast enough it's best and perhaps easier to simply guide and walk your dog away. Especially when working with a reactive or a dog that easily feels frustrated while on walks, there is always a potential that they can redirect their feelings towards you in the heat of the moment when making physical contact.
More often than picking up your dog, practice walking away. Practice walking away from things that aren't so interesting to them, and eventually from things they enjoy and get excited about like toys, other dogs, and people, but in a way where they feel like walking away with you is always more rewarding.
But definitely don't hesitate to pickup your dog if you feel the need to, you know them best!