Read Matthew 2.
Verse 3 told us that King Herod was “disturbed” when he heard that the king of the Jews had been born (v. 2). He was so disturbed that he made sure the Magi knew where to look for Jesus (vv. 4-8), told them to return to him and give him the baby’s precise location (v. 8) so that he could kill Jesus before Jesus could grow up and become king (v. 13).
The star the Magi saw and the fact that the Magi came looking for Jesus were important clues that caused Herod to take the idea of an other king of the Jews seriously. But this Herod died (v. 19a) long before Jesus was old enough to be any kind of threat. So it was irrational for Herod to be so consumed with jealousy that he killed all the young boys under age 2 in Jerusalem (v. 16).
Yet, that’s what Herod did despite how irrational it was.
His personal insecurity was one factor, I’m sure.
But I also believe that Satan was working in his heart as well. The greatest threat to Satan’s will is the Lord Jesus Christ. If Satan could lead Herod to kill Jesus in infancy, then God’s plans and promises could be nullified because the prophecies about the coming Christ would not be fulfilled.
Our Father God protected his Son, our Lord Jesus Christ so that he could complete his mission to save us and bring us into his kingdom. And, God accomplished this salvation while fulfilling other prophesies of Christ (vv. 17-18, 23) in the process.
So think about the extent to which God was faithful to his promises to us in Christ. Since your salvation and sanctification are also promised by him, he will not fail to protect those just as he did not fail to protect Christ.
Remember this when your faith is weak, when doubts are numerous and strong. God will not let his enemies defeat his plans and promises.