Everyone probably knows how important it is to socialize puppies. But it's really important to continue to socialize your dog into adulthood. Puppies can be well-adjusted but without continued socialization can become fearful as they mature.
I've had puppies who were happy and outgoing. But at around 6-8 months of age, they have become less outgoing and almost shy. This became evident when they were taken to dog shows. They were fine being at home but didn't like the noise and the strange (to them) breeds that they encountered at dog shows.
Often times, dogs will be perfectly accepting of strangers and other dogs in their own environment. But when you take them out of that environment, they become less sure of themselves and can become intimidated.
One of the ways to prevent this type of behavior is to take your dog out to meet other people and dogs. Taking your dog to a dog friendly store or to the dog park is great socialization. There they will encounter different people and breeds in a pleasant setting.