Matthew 1:25

But he had no union with her until she gave birth to a Son. And he gave Him the name Jesus.

Note Literally he did not know her

BSB · Berean Standard Bible
And knew her not till she had brought forth her firstborn son: and he called his name JESUS.
KJV · King James Version
and didn’t know her sexually until she had given birth to her firstborn son. He named him Jesus.
WEB · World English Bible
and knew her not till she had brought forth a son: and he called his name JESUS.
ASV · American Standard Version

Related passages

From the Treasury of Scripture Knowledge, grouped by the word they explain.

she
Exodus 13:2; Exodus 22:29; Luke 2:7; Romans 8:29
and he
Luke 2:21