gassy/constipated newborn?

hello mamas! my sweet girl is 5 days old. they recently changed her formula because the first one she couldn’t hold down and she spit up a lot. she seems to be doing so much better on the new one we started 3-4 days ago. she pooped once yesterday after being very gassy and straining.. it was like clay and very little. she hasn’t pooped again.. but has been very fussy and gassy! she strains a lot.. seems like she could be constipated. our pediatrician told us to try juice but i heard babies were only supposed to have milk until they were 2-4 months old? she also said we could put rice in her bottles for reflux? i’ve heard that’s unsafe. advice? how do i get my baby some relief?