'Abdur-Rahman bin Samurah (May Allah be pleased with him) said:
The Messenger of Allah (ﷺ) said to me, "When you take an oath and consider something else to be better than it, make expiation for your oath and choose the better alternative."[Al-Bukhari and Muslim].
App reference: Book 18, Hadith 205
Arabic/English book reference: Book 18, Hadith 1715