The Shulchan Aruch · Yoreh De'ah
יורה דעה ר״גYoreh De'ah 203
Siman 203 of 402 in Yoreh De'ah — 7 se'ifim
Se’if 1א׳
אַל תְּהִי רָגִיל בִּנְדָרִים. כָּל הַנּוֹדֵר, אַף עַל פִּי שֶׁמְּקַיְּמוֹ, נִקְרָא רָשָׁע וְנִקְרָא חוֹטֵא.
[Which things are praiseworthy, and which of them are degraded. And following: 7 subsections] Do not become accustomed to making vows. Anyone who vows, even if they keep them, is called evil and is called a sinner.
Se’if 2ב׳
אֵחַר אָדָם נִדְרוֹ, פִּנְקָסוֹ נִפְתַּחַת.
A person who delays their vow, their notebook is opened.
Se’if 3ג׳
הַנּוֹדֵר, כְּאִלּוּ בּוֹנֶה בָּמָה בִּשְׁעַת אִסוּר הַבָּמוֹת; וְהַמְקַיְּמוֹ, כְּאִלּוּ הִקְרִיב עָלֶיהָ קָרְבָּן, שֶׁטּוֹב יוֹתֵר שֶׁיִּשְׁאַל עַל נִדְרוֹ. וְהָנֵי מִלֵּי בִּשְׁאָר נְדָרִים, אֲבָל נִדְרֵי הֶקְדֵּשׁ מִצְוָה לְקַיְּמָן. וְלֹא יִשְׁאַל עֲלֵיהֶם אֶלָּא מִדֹּחַק וְכֵן אִם נִשְׁבַּע עַל אֵיזֶה דָּבָר, לֹא יִשְׁאַל עָלָיו אֶלָּא מִדֹּחַק (מָרְדְּכַי פ"ג דִּשְׁבוּעוֹת בְּשֵׁם מֹהַר"ם וְעוֹד פּוֹסְקִים עַיֵּן בֵּית יוֹסֵף סוֹף סִימָן ר"ל).
One who vows is considered as if they built a forbidden altar, and one who fulfils the vow is as if they sacrificed a forbidden sacrifice, for it is better to annul the vow. This is the case in normal vows, but in the case of hekdesh vows it is obligatory to fulfil them, and one should only have them annulled in extenuating circumstances. RAMA: This is the case, too, when one makes an oath, that they should only seek annulment in extenuating circumstances.
Shulchan Aruch, Yoreh De'ah — Torat Emet 357 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0