Archelaus Ruling in Judea
Joseph was apparently contemplating where to bring Jesus, and when he learned that Archelaus was ruling in Judea he decided to go in another direction, after being warned by God in another dream.Link: https://bible-history.com/new-testament/the-childhood-of-jesus