Why is a service dog so well behaved in public?
Service dogs are not only trained to perform specific tasks for their handler but also how to behave calmly in every environment.
Training should focus on positive experiences to any stimuli: new dogs, people, places, things. Look for stress signals and always give your dog a choice whether to approach or not. Socialize and build confidence with basic obedience, nose work, into to agility (no jumping though!) and provide predictability and security to your doggo.
Introduce new sights, smells, textures, under footings and sounds, and determine how comfortable your dog is in exploring new stimuli and whether they need extensive help from a handler to explore or if they are comfortable on their own. If the dog is comfortable on its own and checks in with the handler, they have a good baseline and temperament to become a service dog.