The Prophet ﷺ said, "A vow brings to the son of Adam nothing that has not already been decreed for him, but the vow drives him toward what has been decreed. Through it, Allah extracts from the miser, so he gives up what he had never given up before."
عن النبي ﷺ قال: لا يأتي ابن آدم النذر بشيء لم يكن قد قدر له، ولكن يلقيه النذر إلى القدر، قد قدر له، فيستخرج الله به من البخيل، فيؤتى عليه ما لم يكن يؤتى عليه من قبل.
Bukhari narrated it in "Oaths and Vows" (6694), and Muslim in "Vows" (7:1640), both from the hadith of Araj, from Abu Hurairah, as mentioned, and the wording given is Bukhari's.In a version from Muslim, "But the vow only coincides with what is already destined." The rest is the same.In a version from Bukhari in "Destiny" (6609), from another route, "The vow does not bring Ibn Adam anything that I had not already destined, but destiny confronts him with it, and I had already destined it for him, so that I may thereby draw something out of the miser."And in a version from Muslim, "Do not make vows, for the vow does not avail anything against destiny, it only serves to draw something out of the miser."