Baby gets constipated when eating solids

gi

He loves food he cries for it but when I give him solids he gets constipated and he screams cries to poop so idk if I should just stop or maybe change the solids I give him? Any advice or what to give him so it won’t upset him??