The Messenger of Allah ﷺ forbade making vows and said, "A vow brings no good. It is only a means by which something is extracted from the miser."
أخبرنا إسمعيل بن مسعود قال حدثنا خالد عن شعبة قال أخبرني منصور عن عبد الله بن مرة
أن رسول الله ﷺ نهى عن النذر وقال إنه لا يأتي بخير إنما يستخرج به من البخيل
Muslim narrated it in the chapter on vows, in the section on the prohibition of vows and that they do not avert anything at all, hadith 1639, from the hadith of Shubah. Bukhari narrated it in the chapter on divine decree, in the section on the servant's referral of his vow to divine decree, hadith 6608, from the hadith of Mansur, with similar wording. It is also in Al-Kubra, hadith 4743.