The answer to this question is as important as it is subtle.
In Hebrew, the title, "God", or "el" in this case, does not apply exclusively to YHWH. There are other examples where ordinary humans would (unblasphemously) be given the title such as:
- Ex 4:16 - He will speak to the people for you, and it will be as if he were your mouth and as if you were God to him.
- Ex 7:1 - Then the LORD said to Moses, "See, I have made you like God to Pharaoh, and your brother Aaron will be your prophet.
- Ex 21:6 - then his master must take him before the judges (אֱלהִים = god/s). He shall take him to the door or the doorpost and pierce his ear with an awl. Then he will be his servant for life.
- Ex 22:8 - But if the thief is not found, the owner of the house must appear before the judges (אֱלהִים = god/s), and they must determine whether the owner of the house has laid hands on the other person's property.
- Judges 5:8 - God chose new leaders (אֱלהִים = god/s) when war came to the city gates, but not a shield or spear was seen among forty thousand in Israel.
- 1 Sam 28:13 - The king said to her, "Don't be afraid. What do you see?" The woman said, "I see a ghostly figure (אֱלהִים = god/s, Samuel here) coming up out of the earth."
- Ps 8:5 - You have made them [mankind] a little lower than the angels (אֱלהִים = god/s) and crowned them with glory and honor.
- Ps 82:1 - God presides in the divine assembly; He renders judgment among the gods [= angels??]
- Ps 82:6, 7 - I have said, ‘You are gods; you are all sons of the Most High.’ But like mortals you will die, and like rulers you will fall.”
- Ps 138:1 - I give You thanks with all my heart; before the gods [= angels??] I sing Your praises.
- Isa 7:14 - All right then, the Lord himself will give you the sign. Look! The virgin will conceive a child! She will give birth to a son and will call him Immanuel (which means ‘God is with us’). NLT
Now, Greek is different. There are no cases in the NT Koine Greek where a human or even an angel is ever called (unblasphemously) "God". Further, Acts 10:25, 26, Rev 19:10, 22:8, 9, etc, all show that men and angels were never to be considered gods and should not be worshiped. [Yes, there are other texts about "not gods at all" (Acts 19:26, Gal 4:8, 1 Cor 5:10, 8:4, 7) and people wrongly making a "god of the stomach" (Phil 3:19), and about false gods of idols, etc - but that is the point - they are all false gods.]
Now, as Daniel Wallace correctly points out (GGBB), the Greek use of the article is important to understand. His flow-chart on page 231 makes this abundantly clear. If the the article is not anaphoric (it cannot be at Matt 1:23 because theos is the first instance in Matthew) and the person is the only one in its class, then the article is "Monadic" - denotes the supreme and only case.
Now, Matt 1:23 uses the phrase, describing Jesus, "ὁ Θεός" = ho theos = THE God. This further reflects Isaiah's later prophecy, discussing Messiah, in Isa 9:6 -
For unto us a child is born, unto us a son is given, and the
government will be upon His shoulders. And He will be called Wonderful
Counselor, Mighty God, Everlasting Father, Prince of Peace.
[Compare Isa 10:21 where the same Hebrew phrase, "mighty God" is used to describe YHWH.]