The Messenger of Allah ﷺ often used to swear by this oath, "No, by the One who turns the hearts."
حدثنا علي بن حجر أخبرنا عبد الله بن المبارك وعبد الله بن جعفر عن موسى بن عقبة
كثيرا ما كان رسول الله ﷺ يحلف بهذه اليمين لا ومقلب القلوب
SourcingBukhari also narrated it in the Book of Predestination, chapter, "He comes between a man and his heart," Hadith 6617 and 7391, from the report of Ibn Mubarak with the same wording.