The Word of God was in subjection to the rulers that were in His day. The Massacre of the Innocents is the incident in the nativity narrative of the Gospel of Matthew (2:16–18) in which Herod the Great, king of Judea, orders the execution of all male children two years old and under in the vicinity of Bethlehem.
https://www.openbible.info/topics/respecting_authorities
Mother Mary and Joseph were led to flee to Egypt just before the event transpired. https://www.desiringgod.org/interviews/truth-or-fiction-did-herod-really-slaughter-baby-boys-in-bethlehem
Here it is important to note that it was not affected in the spiritual; rather Mother Mary was taken out of Jerusalem. The flight into Egypt is a story recounted in the Gospel of Matthew (Matthew 2:13–23) and in New Testament apocrypha. Soon after the visit by the Magi, an angel appeared to Joseph in a dream telling him to flee to Egypt with Mary and the infant Jesus since King Herod would seek the child to kill The Lord.

In the context of this passage, the leaders under consideration may also be our ministers, pastors, priests; all those men and women who serve God at the head of our churches, chapels and charities. God wishes us not only to be obedient to Him, but also to those within his fellowship who have dedicated their lives to following his words and wisdom. For in order to be truly wise, we ought to also know that knowledge does not spring from oneself alone, but in knowing when to listen, especially to leaders who know The Word of Christ inside out, who have spent their lives and careers devoted to understanding His salvation.
And we pray:
God on High, my Lord and my Savior. Let me serve You Lord, and all those who do Your bidding in Your name. Show me wisdom in heeding the words of my spiritual leaders, who preach you word each and every day. Lift also their burdens Lord, for heavy may be the weight and difficult the tasks entrusted upon them by their congregations and community. Strengthen their faith and allow the Holy Spirit to work within them for the benefit of our your followers. In Jesus’ name I pray, Amen.