Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:32:21

And we will surely let them taste the nearer punishment short of the greater punishment that perhaps they will repent.  

And We shall surely make them taste the nearer chastisement, that is, the chastisement of this world — in their being killed or taken captive, or ˹through˺ years of drought and disease — before the greater chastisement, the chastisement of the Hereafter, that perhaps they, namely, those remaining of them, may return, to belief.
القرآن:٣٢:٢١

وَلَنُذِيقَنَّهُمْ مِنَ الْعَذَابِ الْأَدْنَىٰ دُونَ الْعَذَابِ الْأَكْبَرِ لَعَلَّهُمْ يَرْجِعُونَ  

{ولنذيقنهم من العذاب الأدنى} عذاب الدنيا بالقتل والأسر والجدب سنين والأمراض {دون} قبل {العذاب الأكبر} عذاب الآخرة {لعلهم} أي من بقي منهم {يرجعون} إلى الإيمان.

See similar narrations below:

Collected by Ḥākim, Ṭabarānī, Nasāʾī's Kubrá
hakim:3551Abū al-ʿAbbās Muḥammad b. Aḥmad al-Maḥbūbī > Aḥmad b. Sayyār > Muḥammad b. Kathīr > Sufyān > al-Aʿmash > Abū al-Ḍuḥá > Masrūq

[Machine] "From Abdullah (may Allah be pleased with him): 'And We will surely let them taste the nearer punishment short of the greater punishment.' [Quran 32:21] He (Prophet Muhammad) said, 'On the Day of Badr.'"  

الحاكم:٣٥٥١أَخْبَرَنَا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ أَحْمَدَ الْمَحْبُوبِيُّ ثنا أَحْمَدُ بْنُ سَيَّارٍ ثنا مُحَمَّدُ بْنُ كَثِيرٍ ثنا سُفْيَانُ عَنِ الْأَعْمَشِ عَنْ أَبِي الضُّحَى عَنْ مَسْرُوقٍ

عَنْ عَبْدِ اللَّهِ {وَلَنُذِيقَنَّهُمْ مِنَ الْعَذَابِ الْأَدْنَى دُونَ الْعَذَابِ الْأَكْبَرِ} [السجدة 21] قَالَ «يَوْمُ بَدْرٍ»  

هَذَا حَدِيثٌ صَحِيحٌ عَلَى شَرْطِ الشَّيْخَيْنِ وَلَمْ يُخْرِجَاهُ على شرط البخاري ومسلم
tabarani:9038ʿAbdullāh b. Muḥammad b. Saʿīd b. Abū Maryam > Muḥammad b. Yūsuf al-Firyābī > Sufyān > al-Suddī > Abū al-Ḍuḥá > Masrūq

[Machine] From Abdullah regarding his saying "And We will surely let them taste the nearer punishment", he said, "The day of Badr", and "and the greater punishment that perhaps they will turn back", he said, "Whoever remains among them to repent will turn back".  

الطبراني:٩٠٣٨حَدَّثَنَا عَبْدُ اللهِ بْنُ مُحَمَّدِ بْنِ سَعِيدِ بْنِ أَبِي مَرْيَمَ ثنا مُحَمَّدُ بْنُ يُوسُفَ الْفِرْيَابِيُّ ثنا سُفْيَانُ عَنِ السُّدِّيِّ عَنْ أَبِي الضُّحَى عَنْ مَسْرُوقٍ

عَنْ عَبْدِ اللهِ فِي قَوْلِهِ {وَلَنُذِيقَنَّهُمْ مِنَ الْعَذَابِ الْأَدْنَى} قَالَ «يَوْمُ بَدْرٍ» و {الْعَذَابِ الْأَكْبَرِ لَعَلَّهُمْ يَرْجِعُونَ} قَالَ «مَنْ بَقِيَ مِنْهُمْ أَنْ يَتُوبَ فَيَرْجِعَ»  

قَوْلُهُ تَعَالَى: {وَلَنُذِيقَنَّهُمْ مِنَ الْعَذَابِ الْأَدْنَى دُونَ الْعَذَابِ الْأَكْبَرِ لَعَلَّهُمْ يَرْجِعُونَ} [السجدة: 21]

nasai-kubra:11331ʿAmr b. ʿAlī > ʿAbd al-Raḥman b. Mahdī > Isrāʾīl > Abū Isḥāq > Abū al-Aḥwaṣ And ʾAbī ʿUbaydah

[Machine] Abdullah said, "We will surely make them taste the lesser punishment before the greater punishment." [Surah As-Sajdah 21] He said, "Years have passed over them."  

الكبرى للنسائي:١١٣٣١أَخْبَرَنَا عَمْرُو بْنُ عَلِيٍّ حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ عَنْ إِسْرَائِيلَ عَنْ أَبِي إِسْحَاقَ عَنْ أَبِي الْأَحْوَصِ وَأَبِي عُبَيْدَةَ

عَنْ عَبْدِ اللهِ {وَلَنُذِيقَنَّهُمْ مِنَ الْعَذَابِ الْأَدْنَى دُونَ الْعَذَابِ الْأَكْبَرِ} [السجدة 21] قَالَ «سِنُونَ أَصَابَتْهُمُ»