The Messenger of Allah ﷺ said, "Whoever takes an oath and then sees that something else is better than it, let him do what is better and make expiation for his oath."
أخبرنا إسحق بن منصور قال حدثنا عبد الرحمن قال حدثنا شعبة عن عمرو بن مرة قال سمعت عبد الله بن عمرو مولى الحسن بن علي يحدث
قال رسول الله ﷺ من حلف على يمين فرأى غيرها خيرا منها فليأت الذي هو خير وليكفر عن يمينه
[Sahih]. Ahmad reported it: 256/4, 378, from the hadith of Shubah, through this route, and it is in Kubra, no. 4727. Abdullah bin Amr is mastur (of unknown reliability), and the following hadith serves as a corroborating witness for it.