The magi would never have known where to look for the Messiah if not for the priests and scribes whom Herod consulted. The Magi were able to identify the correct region by looking at the stars, but they didn't know the precise location of the king's birth, nor did they necessarily know anything about the identity or nature of the king they were looking for, other than that he was the King of the Jews and of great significance.

Observation of nature brought them to Judea, but the Scriptures (through the priests and scribes) pointed them to Bethlehem, and divine intervention told them that this king was a threat to the prevailing political powers of the time.
Matthew 2:8