In Matthew 2:23 we read, "And he went and lived in a city called Nazareth, that what was spoken by the prophets might be fulfilled: 'He shall be called a Nazarene.'" Since there doesn't seem to be a passage in the OT that Matthew would be quoting, how can Matthew say that this fulfills what was spoken by the prophets?
One must use puns to see the fulfillment.
The wisdom of God is riddle  and the spirit of prophecy is the testimony of Jesus Christ. Matthew teaches the methods to read prophecy by giving us a series of riddles :
- He says there are 42 generations in the genealogy, when there are only 41.
- He says Yeshua (God's salvation) fulfills the prophecy he would be named Immanuel (God with us) Yeshua has a pun "Ya shuwa" meaning "God humbled".
- He teaches Drash by overlaying the stories of Moses, Abraham, Joseph and Israel concerning Egypt, then interpreting them Christologically.
Matthew uses the reference of the Nazarene because he fully expects we would understand, by way of pun, that the prophecy is that of the law of the Nazarite as a prophetic picture of Christ.
 Pr 1:6 To understand a proverb, and the interpretation; the words of the wise, and their dark sayings. [dark sayings = riddle]
As stated, there is nothing in the Old Testament that suggests it was spoken by prophets that Jesus would be called a Nazarene, so I look to Mark's Gospel for the answer. The strong consensus of modern New Testament scholars is that Matthew's Gospel was substantially based on Mark, which does refer to Jesus as a Nazarene.
In the original Greek, Mark refers to Jesus the Nazarene (Ναζαρηνοῦ) four times, at 1:24; 10:47; 14:67; 16:6 - although many Bibles translate this into English as 'Jesus of Nazareth'. Elsewhere, Mark 1:9 says Jesus came from Nazareth (ἀπὸ Ναζαρὲτ) to the place of baptism and on this basis Nazareth might well have been Jesus' home town, although some might have read this reference to Nazareth merely as the starting place of his journey. The author of Matthew knew that Mark several times referred to Jesus as the Nazarene.
Matthew’s Gospel mentions the town of Nazareth several times, but the first time Nazareth is mentioned (Matthew 2:23), the author felt the need to explain that the child Jesus was taken to Nazareth so that he shall be called a Nazarene. This suggests there was not yet a tradition that Jesus came from Nazareth, although there could have been an early tradition that Jesus was a Nazarene. The author assumed that Mark was well informed in calling Jesus a Nazarene, either from some prophetic source or even on the basis that the earlier evangelist should be considered a prophet in his own right. Either way, Matthew showed that what he thought of as said by the prophets had been fulfilled.
Are the prophets quoted in Matthew 2:23 Anna and Simeon of Jerusalem?
But when he heard that Archelaus was reigning over Judea in place of his father Herod, he was afraid to go there. After being warned in a dream, he went to the regions of Galilee. He came to a town called Nazareth and lived there. Then what had been spoken by the prophets was fulfilled, that Jesus would be called a Nazarene. Matthew 2:22-23 New English Translation (NET Bible)
So[cm] the child’s[cn] father[co] and mother were amazed[cp] at what was said about him. Then[cq] Simeon blessed them and said to his mother Mary, “Listen carefully:[cr] This child[cs] is destined to be the cause of the falling and rising[ct] of many in Israel and to be a sign that will be rejected.[cu] Indeed, as a result of him the thoughts[cv] of many hearts will be revealed[cw]—and a sword[cx] will pierce your own soul as well!”[cy] There was also a prophetess, Anna the daughter of Phanuel, of the tribe of Asher. She was very old,[cz] having been married to her husband for seven years until his death. She had lived as a widow since then for eighty-four years.[da] She never left the temple, worshiping with fasting and prayer night and day.[db] At that moment,[dc] she came up to them[dd] and began to give thanks to God and to speak[de] about the child[df] to all who were waiting for the redemption of Jerusalem.[dg] So[dh] when Joseph and Mary[di] had performed[dj] everything according to the law of the Lord, they returned to Galilee, to their own town[dk] of Nazareth. Luke 2:33-39 New English Translation (NET Bible)
The Triumphal Entry: And the crowds were saying, “This is the prophet Jesus, from Nazareth in Galilee.” Matthew 21:11 New English Translation (NET Bible)
All the people of Jerusalem, who were waiting for redemption, trusted that child, already born a prophet and resident in Nazareth, that is, Jesus the Nazarene.
It didn't. Both authors were "in the weeds".
The NT authors went through hoops to prove that Jesus fulfilled the scripture “He will be called a Nazarene” when that’s actually a misunderstanding on their part. The prophecy, originally about Samson, says that he will be a “Nazirite”, a member of a sect called the Nazirites, not a citizen of a town called Nazareth!:
[Num 6:13 NLT] (13) "This is the ritual law for Nazirites. At the conclusion of their time of separation as Nazirites, they must each go to the entrance of the Tabernacle
[Jdg 13:5 NLT] (5) You will become pregnant and give birth to a son, and his hair must never be cut. For he will be dedicated to God as a Nazirite from birth. He will begin to rescue Israel from the Philistines."
[1Sa 1:11 NLT] (11) And she made this vow: "O LORD of Heaven's Armies, if you will look upon my sorrow and answer my prayer and give me a son, then I will give him back to you. He will be yours for his entire lifetime, and as a sign that he has been dedicated to the LORD, his hair will never be cut."
[Amo 2:10-12 NLT] (10) It was I who rescued you from Egypt and led you through the desert for forty years, so you could possess the land of the Amorites. (11) I chose some of your sons to be prophets and others to be Nazirites. Can you deny this, my people of Israel?" asks the LORD. (12) "But you caused the Nazirites to sin by making them drink wine, and you commanded the prophets, 'Shut up!'
That’s why Samson had long hair!
So that makes two authors who were so ignorant of the Hebrew scriptures that they went to great lengths (multiple miracles) in their fictitious stories to have Jesus hail from two different towns, and neither contrived saga actually fulfills the original “prophecy” that they felt it was necessary to fulfill! Talk about bungling the job!
Have a very merry. - the Grinch!
This is a great question and the general consensus among scholars seems to point to the Hebrew transliteration for branch in the passage from Isaiah. I believe this is a strong candidate for helping address this dilemma. However, I believe there is another source of prophecy that should not be discounted that helps provide additional insight into this obscure reference to the Nazarene character of Christ. The section of scripture we will be referencing initially comes from Genesis 49:26. The context of this passage of scripture surrounds the blessing/prophecy Jacob shares over his children, the twelve tribes of Israel.
Genesis 49:26 NKJV
The blessings of your father Have excelled the blessings of my ancestors, Up to the utmost bound of the everlasting hills. They shall be on the head of Joseph, And on the crown of the head of him who was separate from his brothers.
For completion sake and to help address any confusion with the wording, the NIV has been included below as well since that is the wording the interlinear section seems to borrow from:
Genesis 49:26 NIV
Your father's blessings are greater than the blessings of the ancient mountains, than the bounty of the age-old hills. Let all these rest on the head of Joseph, on the brow of the prince among his brothers.
Now, let's focus on the great deal of emphasis Jacob places on the degree of blessings from his ancestors, "up to the utmost bound of the everlasting hills." In other words, blessings everlasting. These will come upon Joseph who was separate(d) from his brothers. Let's look at the original word for "separated".
Strong's concordance provides various renderings for the meaning of this word, one of which is Nazirite! The others are consecrated and devoted, respectively.
Strong's Concordance https://biblehub.com/hebrew/5139.htm
nazir: one consecrated, devoted Original Word: נָזִיר Transliteration: nazir Definition: one consecrated, devoted NAS Exhaustive Concordance Word Origin from nazar Definition one consecrated, devoted NASB Translation consecrated ones (1), Nazirite (9), Nazirites (2), one distinguished (2), untrimmed vines (2).
(As a quick aside, I believe it is also worth mentioning one of the first few references to the Messiah can be found in Jacob's blessing to Judah. So we already have the stage being set to point mysteriously to Jesus as the Shiloh to come, the obedience of the people.)
Our last source of support for this view into the prophetic nature of Jesus being a Nazirite comes from Moses' blessing to the children of Israel before his death. Moses' not only supports Jacob's blessing but further reinforces and builds upon it. The section of scripture is located Deuteronomy 33:15-16.
15With the best things of the ancient mountains, With the precious things of the everlasting hills, 16With the precious things of the earth and its fullness, And the favor of Him who dwelt in the bush. Let the blessing come ‘on the head of Joseph, And on the crown of the head of him who was separate from his brothers.’
Already we see a strong allusion to Jacob's blessing, with respect to the everlasting hills and the head of him who was separate using the Hebrew word for nazir. But even more important than the use of nazir is the blessing Moses places upon Joseph:
"And the favor of Him who dwelt in the bush"
The favor of Him (God/Angel of the Lord, Christ) who dwelt in the bush, originally granted to Moses, has now been bestowed upon Joseph. We can see Joseph as a type of Christ, who received the ultimate favor of the Lord, Christ consecrated for Israel and the Church.
In sensus plenior:
Nazarene and Nazarite are considered puns.
Heb 10.1 tells us that the law has a shadow of the good things coming. The law has a prophecy of Christ.
The Nazarite law is a prophecy of Christ. The Nazarite wears long hair which the flesh tells us is a shame on a man:
1Co 11:14 Doth not even nature itself teach you, that, if a man have long hair, it is a shame unto him?
This is a prophetic picture of Christ bearing our shame on the cross.
THe Nazarite did not drink wine or strong drink which represent grace and law, indicating that Jesus did not partake of grace or law since he was the source of grace and law.
The Nazarite did not touch dead bodies, and Jesus was buried in an unused tomb.
Jesus told us that he was about to fulfill the prophecy when, at the last supper, he said he would not drink again until...
We must not, however, mix pictures. He was not a Nazarite. He fulfilled the prophecy hidden in the law of the Nazarite. Since he was not a Nazarite, sipping a bit of vinegar on the cross does not violate the picture. To fulfill the prophecy, he bore our shame, did not partake of grace or law, and was untainted by sin in the grave though he carried ours there.
We can say with Matthew that he would be called a Nazarene.
When Nathaniel heard Jesus was from Nazareth, he asked if anything good could come from there, because Nazareth has the same root Nazir, meaning separate, but also meaning undressed. It is a shame to be undressed. Nathaniel knew how to use the puns.
The first answer also uses a pun which is acceptable in sensus plenior and would be a confirming set of linked verses, but puns are not permitted in the literal-historical method, though they are used occassionally with great discomfort.