Vows to God were made during Old Testament times.
God allowed people to make vows to teach people to keep their word.
However, people made foolish vows such as the one made by Jephthah, which ended with the death of his own daughter (see Judges 11:29-40).
Jephthah was a judge of Israel. He went to war with the sons of Ammon.
"Jephthah made a vow to the Lord and said, 'If You will indeed give the sons of Ammon into my hand, then it shall be that whatever comes out of the doors of my house to meet me when I return in peace from the sons of Ammon, it shall be the Lord’s, and I will offer it up as a burnt offering.'" (Judges 11:30-31)
"When Jephthah came to his house at Mizpah, behold, his daughter was coming out to meet him with tambourines and with dancing. Now she was his one and only child; besides her he had no son or daughter. When he saw her, he tore his clothes and said, 'Alas, my daughter! You have brought me very low, and you are among those who trouble me; for I have given my word to the Lord, and I cannot take it back.'" (Judges 11:34-35)
So Jephthah made a tragic vow. When he made the vow, he should have known that whatever came out of his house would either be a person or an animal, neither of which was desired for sacrifice. God only accepted sacrifices of bulls/rams. (A dog or a cat is unacceptable as a sacrifice, and it is unlikely a bull or ram would be the first to come out of a house to greet him.)
God did not even take a human as a sacrifice when He told Abraham to sacrifice Isaac (it was only a test). But God provided a ram in place of Isaac (Genesis 22:13).
So Jephthah (being a judge of Israel) should have known not to make such a vow.
But God did not stop Jephthah from sacrificing his daughter in order to teach all Israel to not make foolish vows.
"At the end of two months she returned to her father, who did to her according to the vow which he had made; and she had no relations with a man. Thus it became a custom in Israel, that the daughters of Israel went yearly to commemorate the daughter of Jephthah the Gileadite four days in the year." (Judges 11:39-40)
So for a long time, Israel remembered the daughter of Jephthah and taught against making bad vows every year.
---
When Jesus came to earth, He taught people to stop making vows.
Jesus said: "Again, you have heard that the ancients were told, ‘You shall not make false vows, but shall fulfill your vows to the Lord.’ But I say to you, make no oath at all, either by heaven, for it is the throne of God, or by the earth, for it is the footstool of His feet, or by Jerusalem, for it is the city of the great King. Nor shall you make an oath by your head, for you cannot make one hair white or black. But let your statement be, ‘Yes, yes’ or ‘No, no’; anything beyond these is of evil." (Matthew 5:33-37)
There are many unforeseen circumstances that can keep a person from fulfilling a vow. Since we cannot even will our own hair to turn white or black, we cannot control many circumstances. So our vows could easily fail and we would be in sin. Also, we could be making foolish and tragic vows like Jephthah did.
Therefore, Jesus tells us to make no vows or oaths. Vows should NOT be made today in light of what Jesus has said.
We should keep our word as much as possible without an oath. Now that believers have the power of the Holy Spirit, we do not need a vow to try to keep our word. If we only keep our word with a vow, does that mean we lie the rest of the time?
With God's help, we can say "yes, yes" and "no, no" and mean it.
Vows have become unnecessary and sinful. Vows were there in ancient times to teach people to keep their word.
But now that we have Jesus' blood to cleanse us from sins and the Holy Spirit to help us live in a holy and godly way, we do not need vows.
We should speak truth all the time (not like the ancients in which only the vows counted, but other things that they said may or may not be true/binding).