Having difficulty in passing stool at this age there might be having 2 possibilities.
1, Feeding is not enough, perhaps due to less breast milk or
2, there might be having some birth anomaly in her colon
or anal sphincter.
Consult pediatric surgeon and get examined.
Ok and take care.