My 4 old is saying it hurts when she is trying to have a bowel movement. What can I do?

Hydrate-more fluids. Usually painful bm's are the result of very hard stool.The job of the colon is to recover liquid.If we do not have enough liquid in our system the stool becomes very hard and difficult to pass.Add fluids and maybe some prune juice-it is surprisingly effective as a "gentle" laxitive.
Rectal tear. If stool is hard and large when passed it can result in s rectal tear. This will result in pain and bleeding with bowel movements. Treatment would be a good stool softener for 60-90 day trial to allow healing. If symptoms persist see a pediatric surgeon.