The verse says:
...and they went to live in a city named Nazareth. So the thing that was spoken through the prophet was fulfilled...’
So what’s the problem? Well, there is no record of any Bible prophet making such a prediction. However, we may be failing to view this with ancient eyes. To be called a ‘Nazarene’ seems to have been an insult, somewhat like being called a ‘Cretan’ (meaning someone from the island of Crete) was, and still is, an insult.
Many prophets foretold how Jesus would be despised and shamed, and being labeled with the contemptible label of ‘Nazarene’ would go towards that.
The Benson Bible Commentary gives evidence for this position:
“Thus, when Philip said to Nathanael, ‘We have found Jesus of Nazareth, of whom Moses spake,’ Nathanael answered, ‘Can any good thing come out of Nazareth?’ And when Nicodemus seemed to favour him, the rest of the council said to him, ‘Search and look, for out of Galilee ariseth no prophet.’ Here then we have a plain sense of these words. He was sent to this contemptible place that he might there have a name of infamy and contempt put upon him, according to the frequent intimations of the prophets.”