10 day old constipated

My 10 day old is very constipated. We started her on gentlease on day 1 because that works for my older daughter. We were having bad gas problems on day 5 so we switched to Kendamil. The gas resolved and she’s now pooping frequently but they are formed poops that make her strain and scream. Did anyone else have this problem? Is she adjusting to the formula? Should we wait it out or try something else? Thanks!