I'm struggling to determine if you're serious and very unfamiliar with how to interact with and train dogs, or if this post was an enormous effort made on the part of a troll.

In the case of the former....

If you see an off leash dog that is acting in an unfriendly manner do not take your pup towards it. At 6 months he still needs you protect him. And no matter what his age is in the future, for your dog's and your own safety do not force an approach with an unknown and unfriendly dog, especially off leash.

Otherwise, if your dog is of a more submissive nature then there's no guaranteed way to make him dominant. You can do confidence building exercises, but chances are if he's a beta dog he'll always prefer to allow another dog to take charge. And there's nothing wrong with that. Putting your dog in situations as a pup where he is getting beat up by other dogs will do nothing but cause him to fear other dogs more.

If you are genuine in your inquiry, please take a significant amount of time to do A LOT of research on this forum and read up much more on GSDs and their behavior, genetics, training, and care.