The Catechism of the Catholic Church explains that the state known as original sin began with Adam and Eve, and has defined human nature ever since. “By his sin Adam, as the first man, lost the original holiness and justice he had received from God, not only for himself but for all human beings.” (CCC 416) The Church isn’t saying that original sin is genetic, rather that it’s an inevitable part of being human.
Jesus, of course, was an exception, and the Catholic Church teaches that Mary was as well. Knowing that she would consent to be the mother of Christ, God gave her the honor of being exempt from original sin. “The Most Blessed Virgin Mary was, from the first moment of her conception, by a singular grace and privilege of almighty God and by virtue of the merits of Jesus Christ, Savior of the human race, preserved immune from all stain of original sin.” (Ineffabilis Deus) This should not be seen as a denial of Mary’s humanity; it simply shows that God intervened to create a sinless mother for his sinless son. Yes, it goes against our expectations around original sin, but it’s worth remembering that it’s within God’s power to make that happen, if he so chooses. As Mary herself learned, “nothing is impossible with God.” (Luke 1:37)