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:2:89

And when there came to them a Book from Allah confirming that which was with them - although before they used to pray for victory against those who disbelieved - but ˹then˺ when there came to them that which they recognized, they disbelieved in it; so the curse of Allah will be upon the disbelievers.  

When there came to them a Book from God, confirming what was with them, in the Torah, that is the Qur’ān — and they formerly, before it came, prayed for victory, for assistance, over the disbelievers, saying: ‘God, give us assistance against them through the Prophet that shall be sent at the end of time’; but when there came to them what they recognised, as the truth, that is, the mission of the Prophet, they disbelieved in it, out of envy and for fear of losing leadership (the response to the first lammā particle is indicated by the response to the second one); and the curse of God is on the disbelievers.
القرآن:٢:٨٩

وَلَمَّا جَاءَهُمْ كِتَابٌ مِنْ عِنْدِ اللَّهِ مُصَدِّقٌ لِمَا مَعَهُمْ وَكَانُوا مِنْ قَبْلُ يَسْتَفْتِحُونَ عَلَى الَّذِينَ كَفَرُوا فَلَمَّا جَاءَهُمْ مَا عَرَفُوا كَفَرُوا بِهِ ۚ فَلَعْنَةُ اللَّهِ عَلَى الْكَافِرِينَ  

{ولما جاءهم كتاب من عند الله مصدق لما معهم} من التوراة: هو القرآن {وكانوا من قبل} قبل مجيئه {يستفتحون} يستنصرون {على الذين كفروا} يقولون اللهم انصرنا عليهم بالنبي المبعوث آخر الزمان {فلما جاءهم ما عرفوا} من الحق وهو بعثة النبي {كفروا به} جحداً وخوفاً على الرياسة وجوابُ لما الأولى دل عليه جواب الثانية {فلعنة الله على الكافرين}.