Puppies can get very sick, and even die from the shots that they give them, although this usually happens with small breed puppies, and not with a larger breed like a german shepard is. If there were worms in the stool, and they were dead, then the person that you bought the puppy from had probably recently wormed him.
Puppies should be wormed before they are three months old; so if your puppy is that old and had never been wormed before, he could be very badly infested with worms.
Also, it is good to get a special puppy food and not just give your puppy regular adult dog food.
Dogs hat aree not raised with a lot of human companionship are often very traumatized when they are sold and taken away from their mother and littermates, which are the only family they are used to.
Over time, and with a lot of gentleness, even shy puppies should bond with their owner, although (as was mentioned) some dogs are naturally introverted and shy, just like some humans are.