Your puppy might behaving painful defecation that is why she is yelping while pooping. Painful defecation in dogs can be due to following conditions
1. Constipation
2. Problems of prostate in male dogs
3. Inflammation of colon
4. Inflammation of rectum
5. Problems with pelvic bones
6. Anal cancer
7. Anal polyps
8. Sticking of feces on the hairs around anus
9. Foreign bodies in colon or rectum
10. Ulcer in the rectum
11. Narrowing of rectum or anus
12. Anal sac problems
So, you should take your puppy to vet for proper diagnosis and treatment.
1. Constipation
2. Problems of prostate in male dogs
3. Inflammation of colon
4. Inflammation of rectum
5. Problems with pelvic bones
6. Anal cancer
7. Anal polyps
8. Sticking of feces on the hairs around anus
9. Foreign bodies in colon or rectum
10. Ulcer in the rectum
11. Narrowing of rectum or anus
12. Anal sac problems
So, you should take your puppy to vet for proper diagnosis and treatment.