Scripture is wisely silent on the marital life of Mary and Joseph.
Likely the Church adopted this position in its early days to fend off the emergence of any characters claiming to be a blood relative of Jesus and challenging the Pope for control.
Though in reality, every Jew that you meet (save converts) is a blood relative of Jesus.
It’s not completely silent, apparently.
Someone else posted Mathew 1:25, which seems to indicate that Mary and Joseph were not celibate after the birth of Jesus.