It would seem this way; but I'm also interested in what the Scripture DOESN't say; namely that they were CURRENTLY in Nazareth when the Magi visited the HOUSE.
While it is highly likely; the facts, as we know them, do not permit me to state, with 100% assurance.
Matthew ends the verse arguing that Jesus' life in Nazareth fulfilled a messianic prophecy, which he quotes: "He will be called a Nazarene." However, no such prophecy is found in the Old Testament, or any other extant source.
Matthew 2:23
And thus your Jerusalem argument falls apart because scripture doesn’t say they visited anyone in Jerusalem other than Herod. That the Magi went to Nazareth has to be inferred from the evidence given. But you’re right about “Nazarene.” There is no such prophecy and those who study hermeneutics have been wrestling with what Matthew meant for centuries.