My LO was like this when we first started weaning. Someone told me don’t think of it as them in pain, it’s just their bodies adjusting to consuming and digesting food. My son used to grunt sooo badly I would hold him in a squat position to help him go. But eventually his poops became less of an event! He’s 9 months old now and poops without any issues.
My girl was up and down with it when we started weaning
Try baby massage! I work in a nursery and we try this on our little ones to help them poo! Work like a charm. You can YouTube video on what to do x
My lg was very constipated and her poop was like rocks!!! So i got some purees of prunes..... she demolished it to my surprise 😮 and she has softer poops now... Also a nice bath can help 😌
How much food are you feeding him? May be you need to slow down the weaning