Not the dog is the problem, it is the human!
You got a dog? Have you met them saying “My dog must not greet another dog as long it is leashed! That only gives problems.”? Perhaps those dog owners are just too lazy or ignorant to teach their dogs to master such a situation? Or to give them the chance to greet one another without the leash?
Then are the others who take away their dogs and don’t give them permission to greet your dog. Haven’t they realized that dogs are much more social than the homo sapiens sapiensis? A dog wants to greet, they like to check out their position in comparison to the other dog. And they are curious. The problems begin, when they aren’t allowed to do that. The become unsocial. And fearsome. The growl to say “Don’t come near, that’s my limit, I am uncertain how to behave.” And after a while, they bark because they don’t know how to be together with other dogs any longer. And perhaps to avoid the disappointment to not be allowed to follow their nature. That is cruelty to animals and ought to be punished!
Sadly, there is no law to punish such a crime. For some humans and their dogs, there is no hope any longer. With some few you could try to break the ignorance by taking the first step and say something like “now there’s a fine dog that wants to greet” and take the lead in the situation. That helps sometimes. But you have to be very careful there, observe the humans, that is important. There you should see if that is possible or not. And some seem to realize that their “No-greeting-policy” feels unnatural and perhaps begin to think. Let’s hope so for the best of the dogs.