There are two important takeaways from the incident of King Herod's vow to Herodias' daughter. The first is to be careful with your words, because a hasty vow is sin (Leviticus 5:4).
But another thing I found interesting is that Herod actually was somewhat careful with his vow. "Up to half my kingdom", he said. He never promised any heads, he promised her up to half of his kingdom. Could Herodias' daughter have asked for the whole kingdom? In theory, yes, but Herod's vow would not bind him to agree.
How, then, does John the Baptist's head factor into this? Was John not more valuable than the whole kingdom? Of course! Herod's folly, therefore, was twofold. Not only did he make a hasty vow, but he was extremely sloppy in how he applied it.
Let us therefore learn from Herod: Be extremely careful with your vows. Ensure you word them in such a way as to prevent disaster, and in the event there is no wording that can prevent such disaster, just don't make the vow in the first place.