Sahih Muslim 6472
The Book of the Merits of the Companions
وَحَدَّثَنِي الْحَسَنُ بْنُ عَلِيٍّ الْحُلْوَانِيُّ، حَدَّثَنَا أَزْهَرُ بْنُ سَعْدٍ السَّمَّانُ، عَنِ ابْنِ عَوْنٍ، عَنْ إِبْرَاهِيمَ، عَنْ عَبِيدَةَ، عَنْ عَبْدِ اللَّهِ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " خَيْرُ النَّاسِ قَرْنِي ثُمَّ الَّذِينَ يَلُونَهُمْ ثُمَّ الَّذِينَ يَلُونَهُمْ " . فَلاَ أَدْرِي فِي الثَّالِثَةِ أَوْ فِي الرَّابِعَةِ قَالَ " ثُمَّ يَتَخَلَّفُ مِنْ بَعْدِهِمْ خَلْفٌ تَسْبِقُ شَهَادَةُ أَحَدِهِمْ يَمِينَهُ وَيَمِينُهُ شَهَادَتَهُ " .
Abdullah (b. Mas'ud) reported Allah's Apostle (ﷺ) as saying:The best among people are of my generation, then those next to them. (The narrator said): I do not know whether (he said) it three times or four times. Then there would fellow after them such persons whose evidence would precede the oath, and in case of some others, the oath (would precede) the evidence
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.