Moses spoke to the heads of the tribes of the people of Israel, saying, “This is what the LORD has commanded. If a man vows a vow to the LORD, or swears an oath to bind himself by a pledge, he shall not break his word. He shall do according to all that proceeds out of his mouth.
“If a woman vows a vow to the LORD and binds herself by a pledge, while within her father’s house in her youth, and her father hears of her vow and of her pledge by which she has bound herself and says nothing to her, then all her vows shall stand, and every pledge by which she has bound herself shall stand. But if her father opposes her on the day that he hears of it, no vow of hers, no pledge by which she has bound herself shall stand. And the LORD will forgive her, because her father opposed her.
“If she marries a husband, while under her vows or any thoughtless utterance of her lips by which she has bound herself, and her husband hears of it and says nothing to her on the day that he hears, then her vows shall stand, and her pledges by which she has bound herself shall stand. But if, on the day that her husband comes to hear of it, he opposes her, then he makes void her vow that was on her, and the thoughtless utterance of her lips by which she bound herself. And the LORD will forgive her. (But any vow of a widow or of a divorced woman, anything by which she has bound herself, shall stand against her.) And if she vowed in her husband’s house or bound herself by a pledge with an oath, and her husband heard of it and said nothing to her and did not oppose her, then all her vows shall stand, and every pledge by which she bound herself shall stand…”
These are the statutes that the LORD commanded Moses about a man and his wife and about a father and his daughter while she is in her youth within her father’s house. (Numbers 30 ESV)
The ESV Study Bible note on this text is helpful:
The placement of this law here may seem surprising, but there are several reasons why it should come here. Vows are mentioned in 29:39, and they are often involved in the offering of a sacrifice. Also, war often prompts vows, and Israel is about to start its military campaign in Canaan. In addition, the conquest of Canaan depends on God keeping his promised word to Israel, and Israel must be equally strict in carrying out her promises to God.
As to the ability of a father or husband to contradict his daughter’s or wife’s oath, we are probably dealing with ignorance about culture. Likely a major factor is that the authority and responsibility for the family is invested in the man. If he deems the vow to be one that could hurt his daughter or wife or his household he is responsible to counter it and Yahweh is fine with that. But this would not explain why no similar mention is made of a son who makes a vow. And it cannot be a matter of women being somehow incapable of making proper vows since widows and divorced women are in no way restricted concerning vows and men have obviously made some pretty foolish vows (Judges 11:30,31; 1 Samuel 14:24).
In any case, Moses is urging caution about making a vow because of how wrong it is to not fulfill it. Jesus, indeed, urges his disciples to refrain from oaths. Too many people use vows or oaths as a means of disciplining themselves against sin, but this is a very inadequate, in fact improper and ineffective, way to maintain self-control. It is not the way of the cross. Obedience and self-control is a fruit of the Spirit and comes from intimate relationship with Jesus, where we begin to take on his likeness, and from the help of the community and its accountability.