Christ, of course, could have obliterated King Herod with the slightest movement of His divine will. But He did not. Instead, the heavenly Father sent an angel to His Son’s foster-father, telling him to take flight into Egypt. God dealt with the threat to His life the way that any human being would deal with it: He ran away to a safe place.
This is one of the countless examples of Christ’s solidarity with us. Part of being human is living in a world marked by evil, disorder, and sin. Christ, of course, never sinned. But He accepted every aspect of the reality of living in the sinful world. He is with us in everything we have to deal with.