My first child was constipated and come to find out he was lactose intolerant.
While he is truing to poop lay him on his back and put his knees up and push in on his butt cheeks. We used to have to help a baby at the day care poop and that helped her a lot
Might be the formula. Does it have added iron? For long term try changing the formula to a lower iron one ( if it does have iron). Another issue could maybe the baby needing soy formula. Sometimes the lactose in the milk based formula causes constipation. I had to give my daughter a portion of a glycerin suppository to help get. But Idk if you can give it that small. Check again with the pediatrician.