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:43:21

Or have We given them a book before the Qur'an to which they are adhering?  

Or have We brought them a scripture before, that is, ˹before˺ the Qur’ān, that they should worship other than God, so that they are holding fast to it? In other words, this never happened.
القرآن:٤٣:٢١

أَمْ آتَيْنَاهُمْ كِتَابًا مِنْ قَبْلِهِ فَهُمْ بِهِ مُسْتَمْسِكُونَ  

{أم آتيناهم كتاباً من قبله} أي القرآن بعبادة غير الله {فهم مستمسكون} أي لم يقع ذلك.

See similar narrations below:

Collected by Qurʾān
quran:28:52

Those to whom We gave the Scripture before it - they are believers in it.  

Those to whom We gave the Scripture before this, that is, ˹before˺ the Qur’ān, they believe in it, too. This was revealed regarding certain Jews who became Muslims, such as ‘Abd Allāh b. Salām and others, and ˹certain˺ Christians who had come from Abyssinia and Syria ˹who also became Muslims˺.
القرآن:٢٨:٥٢

الَّذِينَ آتَيْنَاهُمُ الْكِتَابَ مِنْ قَبْلِهِ هُمْ بِهِ يُؤْمِنُونَ  

{الذين آتيناهم الكتاب من قبله} أي القرآن {هم به يؤمنون} أيضا نزلت في جماعة أسلموا من اليهود كعبد الله بن سلام وغيره ومن النصارى قدموا من الحبشة ومن الشام.