The Prophet ﷺ said, "Whoever takes an oath and then sees something better than it, let him abandon it, for abandoning it is its expiation."
حدثنا عبد الله بن عبد المؤمن الواسطي حدثنا عون بن عمارة حدثنا روح بن القاسم
أن النبي ﷺ قال من حلف على يمين فرأى غيرها خيرا منها فليتركها فإن تركها كفارتها
[Hasan]. Abu Dawud narrated it in the Book of Oaths and Vows, chapter on the oath concerning severing family ties, no. 3274, through another route from Amr bin Shuayb, in a longer form.