Al-Kahf 55

وَمَا مَنَعَ ٱلنَّاسَ أَن يُؤْمِنُوٓا۟ إِذْ جَآءَهُمُ ٱلْهُدَىٰ وَيَسْتَغْفِرُوا۟ رَبَّهُمْ إِلَّآ أَن تَأْتِيَهُمْ سُنَّةُ ٱلْأَوَّلِينَ أَوْ يَأْتِيَهُمُ ٱلْعَذَابُ قُبُلًا ﴿٥٥﴾

Wama manaAAa alnnasa an yuminoo ith jaahumu alhuda wayastaghfiroo rabbahum illa an tatiyahum sunnatu alawwaleena aw yatiyahumu alAAathabu qubulan

And nothing prevents men from believing, now when the guidance (the Quran) has come to them, and from asking Forgiveness of their Lord, except that the ways of the ancients be repeated with them (i.e. their destruction decreed by Allah), or the torment be brought to them face to face? The Noble Quran