So did this dogma only become part of the church in 1950? I read Pope Pius XII made it so on this day. Any clarity would be appreciated.
No, it was “part of the church” from the very beginning. It’s in the Bible, both by necessary implication and by allusion in Revelation 12. The declaration in modern times was a declaration that it was in fact part of the church from the very beginning.
Dogma is normally declared in response to heresy. Whenever heresy arises, the Church must declare revealed truth, in order to defend the truth.