Qur'an 28:47
وَلَوْلَآ أَن تُصِيبَهُم مُّصِيبَةٌۢ بِمَا قَدَّمَتْ أَيْدِيهِمْ فَيَقُولُوا۟ رَبَّنَا لَوْلَآ أَرْسَلْتَ إِلَيْنَا رَسُولًا فَنَتَّبِعَ ءَايَـٰتِكَ وَنَكُونَ مِنَ ٱلْمُؤْمِنِينَ
“And if not that a disaster should strike them for what their hands put forth [of sins] and they would say, "Our Lord, why did You not send us a messenger so we could have followed Your verses and been among the believers?"...”
Al-Qasas 28:47 · Saheeh International