Muawiya bin Abu Sufyan reported,

I heard the Prophet ﷺ say, "Whoever Allah wishes good for, He grants him understanding of the religion. I am only one who distributes, and it is Allah who gives. The affairs of this nation will continue to be upright until the Hour is established, or until the command of Allah comes."

Bukhari 7312

Sahih

حدثنا إسماعيل حدثنا ابن وهب عن يونس عن ابن شهاب أخبرني حميد قال سمعت

معاوية بن أبي سفيان يخطب قال

سمعت النبي ﷺ يقول من يرد الله به خيرا يفقهه في الدين وإنما أنا قاسم ويعطي الله ولن يزال أمر هذه الأمة مستقيما حتى تقوم الساعة أو حتى يأتي أمر الله

البخاري 7312صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhering to the Book and the Sunnah
Chapter
Prophet's ﷺ saying, "A group of my ummah will always be victorious upon the truth, fighting." They are the people of knowledge
Numbering
Darussalam 7312
Bukhari 7312