Matthew 1:24 says that Joseph took Mary as his wife. But it does not say that they had sex.
Agreed. Verse 25 provides us with the extra testimony that Joseph knew not his wife until the birth of her firstborn son.
Right. Which testifys to the miraculous nature of His Birth, not to the intra-marital dynamic.
SD