I realize that Mary was conceived through the Holy Spirit, but if she was a virgin till death like the Catholic religion teaches, how would her marriage to Joseph be valid without consummation, which Catholic marriages require?
First, Mary was conceived in the womb of her mother in the same natural manner that all of us are conceived. The only difference between her conception and ours is that, from the moment of conception, she was preserved from original sin. It was Jesus who was conceived by the power of the Holy Spirit.
Second, Mary’s marriage to Joseph fell under Jewish law, not Catholic law. For more information on perpetual virginity within the Jewish tradition, see the article linked below.
The Perpetual Virginity of Mary by Br. Anthony Opisso, M.D.