How do I get my little to poop in the potty?

We started potty training 2 or 3 weeks ago. She did great from the start! Only 1 pee accident on the 1st day. She will not poop in the potty or her a pull up she’s been holding it for days! This afternoon she started crying that her tummy hurt so she’s been to the potty 7382648 times but she will not do it! She hates her pull up unless it’s bed time and she’ll hold her pee all night. I just need her to poop. How did you get your little to poop on the potty?