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. (Using translation from Abū Dāʾūd 3273)
قَالَ رَسُولُ اللهِ ﷺ لَا نَذْرَ إِلَّا فِيمَا ابْتُغِيَبِهِ وَجْهُ اللهِ ﷻ وَلَا يَمِينَ فِي قَطِيعَةِ رَحِمٍ