Gender Question!

Nia
I went for an ultrasound when I was 4 months and they told me it was a boy. And I went last week for another ultrasound and the baby was keeping his legs closed and the guy doing the ultrasound said he thinks it a girl but could not confirm that it is. My question is can the gender change? Or the guy doing the ultrasound didn't know what he was doing lol. Because he didn't get the baby to open his legs.