AnswerThe Catholic Church has always had difficulty with the gospel mention of the brothers and sisters of Jesus, because the Church not only wanted Mary to be a virgin at the time of Jesus' birth, but remain a virgin throughout her life. One solution was to decide that they were not his brothers and sisters at all: they were cousins. This defies the gospel text, so another solution was to decide that they were only half-brothers, and that Joseph had previously been married.
There are problems with the notion that the brothers and sisters were from a previous marriage. One is that in the Lucan version of the nativity, Joseph would surely have brought the young children to Bethlehem for the census, but there is no evidence of that in the gospel. Nor does Matthew mention the young children fleeing to
Egypt or returning with Joseph and Mary after the death of Herod. This suggests that the brothers and sisters were not yet born.
The gospels say Jesus was born during the reign of King Herod, and Matthew implies that he was born quite some time before Herod died (April 4 BCE). Since Jesus had several brothers and sisters, we can estimate that John would have been born well before 10 BCE if he was the first-born of a previous wife of Joseph. Paul mentioned meeting James, and the meeting is traditionally placed in the 50s CE. On the hypothesis of a previous marriage, John would have been in his late sixties or seventies, yet Paul gives no hint that John was (by ancient standards) an elderly man.
The Bible does not tell us that Joseph had a previous wife and the case for this is weak. We should assume that Joseph had no other wife than Mary.