This is a dietary intestinal health concern with eating inedible food sources. I would suggest some dog food/treats or canned pumpkin to comfort his stomach. Also remove all traces of poo from your backyard. Or if this issue is getting worse, then consult a veterinarian as soon as possible.
All dogs eat poop, for some reason it is appealing to them. One of the reasons they do so is because they aren't getting enough nutrients out of their food. Your dog probably needs a different kind.
He might have eaten something he shouldn't have. Since he is a puppy, you need to take him to the vet. I've seen instances where dogs have eaten tennis balls and have gotten extremely sick.