The Messenger of Allah ﷺ said, "Whoever swears an oath and then sees that something else is better than it, let him make expiation for his oath and do what is better."
حدثني يحيى عن مالك عن سهيل بن أبي صالح عن أبيه
أن رسول الله ﷺ قال من حلف بيمين فرأى غيرها خيرا منها فليكفر عن يمينه وليفعل الذي هو خير