“Mary’s pregnancy is Spirit-conceived. God’s Holy Spirit has made her pregnant.” ~God’s Angel
Joseph had a lot to deal with. What to name the Son of God wasn’t one of them. God’s angel made that clear to him. His name is Jesus (Yehshuah), “God Saves”.
His bigger problem was what to do about his fiance who was pregnant but claimed the Holy Spirit got her pregnant. He trusted Mary but only up to a point. He was going to call the whole thing off. The angel solved that for him as well.