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.
It is clear to Joseph that this child will be like no other. First, her pregnancy is from a man. Second, it is God, through His Spirit, that has caused the pregnancy. Third, the child will be a boy. Finally, His name will show God’s purpose, to deliver and rescue mankind.
So … the Son of God is named Jesus (Yehshuah). And, most importantly, Jesus rescues and delivers us from sin, that is, missing God’s goal for our lives.
While he was trying to figure a way out, he had a dream. God’s angel spoke in the dream: “Joseph, son of David, don’t hesitate to get married. Mary’s pregnancy is Spirit-conceived. God’s Holy Spirit has made her pregnant. She will bring a son to birth, and when she does, you, Joseph, will name him Jesus (Yehshuah)—’God saves’—because he will save his people from (sin) missing God’s goal for their lives.” Matthew 1:20-23