The Messenger of Allah (ﷺ) said: A vow is binding in those things by which the pleasure of Allah is sought, and an oath to break ties of relationship is not binding.
Sunan Abi Dawud Book 22, Hadith 32