Dwelling more on the matter
If a puppy eats its own excrement, most likely it has some dysbacteriosis. In this case, adding enzymes or a course of probiotics can help solve the problem. But sometimes, when it comes to puppies, eating poop can be a result of the punishment for uncleanliness in the apartment.
Most often our pets (dogs and cats) eat excrement if their body misses some microelements. By the way, if you have a dog and a cat and your dog eats poop after the cat, it is strongly advised to check not only dog but your cat's health as well. Probably, cat's poop has a very attractive smell because the food hasn't been digested fully due to low acidity or other physiological matters.
Eating manure (cow, horse, etc.) is almost considered to be a norm. There is even a trend, which supporters advise to let your dog eat fresh and ecological manure when possible. Most often, if the dog likes to eat the manure of herbivores, it is caused by a lack of fiber and enzymes. High interest in manure is eliminated by adding uncleaned (black) rumen to the dog's diet.
The worst case is eating human excrement. No one can define a single reason for that. There are several widespread versions. This can be caused by worm infestation or by the lack of microelements, enzymes or energy. There's also an opinion that dogs simply find human excrement tasty because of a rich diet. However, all these versions are quite disappointing.
Apart from physical reasons, eating excrement can have a psychological background. It can be a "bad habit" or a response to punishment, stress or a lack of attention.