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:4:137

Indeed, those who have believed then disbelieved, then believed, then disbelieved, and then increased in disbelief - never will Allah forgive them, nor will He guide them to a way.  

Verily, those who believed, in Moses, namely, the Jews, and then disbelieved, by worshipping the calf, and then believed, after that, and then disbelieved, in Jesus, and then increased in disbelief, in Muhammad — it was not for God to forgive them, for what they have persisted in ˹of disbelief˺, nor to guide them to a way, to the truth.
القرآن:٤:١٣٧

إِنَّ الَّذِينَ آمَنُوا ثُمَّ كَفَرُوا ثُمَّ آمَنُوا ثُمَّ كَفَرُوا ثُمَّ ازْدَادُوا كُفْرًا لَمْ يَكُنِ اللَّهُ لِيَغْفِرَ لَهُمْ وَلَا لِيَهْدِيَهُمْ سَبِيلًا  

{إن الذين آمنوا} بموسى وهم اليهود {ثم كفروا} بعبادتهم العجل {ثم آمنوا} بعده {ثم كفروا} بعيسي {ثم ازدادوا كفرا} بمحمد {لم يكن الله ليغفر لهم} ما أقاموا عليه {ولا ليهديهم سبيلا} طريقا إلى الحق.