That is because they say, "Never will the Fire touch us except for [a few] numbered days," and [because] they were deluded in their religion by what they were inventing.
Chastising the People of the Book for Not Referring to the Book of Allah for Judgment
Allah criticizes the Jews and Christians who claim to follow their Books, the Tawrah and the Injil, because when they are called to refer to these Books where Allah commanded them to follow Muhammad , they turn away with aversion. This censure and criticism from Allah was all because of their defiance and rejection. Allah said next,
(This is because they say: "The Fire shall not touch us but for a number of days.") meaning, what made them dare to challenge and defy the truth is their false claim that Allah will only punish them for seven days in the Fire, a day for every one thousand years in this life. We mentioned this subject in the Tafsir of Surat Al-Baqarah.
While dealing with the subject of Jews, as in verses 21-22, the text goes on to censure a particular claim of theirs in the present verse. The address is to the Holy Prophet ﷺ and the reference is to the Torah given to the Jews who would have found it enough for them if they were really looking forward to guidance. But they elect to be in-different because they say and believe that the fire of Hell will not touch them except for a few days, after which, according to their supposition, they would be forgiven. This, it has been said, is self-deception caused by what they have been forging for themselves like their belief that they were the progeny of prophets and therefore, they will escape punishment in the fire of Hell.
Jews contended that they had worshipped the calf for 40 days and so they will incur punishment, if any, for the same period only.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 24–26
God’s guidance is one and the same as that revealed to various prophets from time to time in various languages. The same guidance was revealed to the Final Prophet in the form of the Quran. Due to this uniformity in content, recognizing the call of the Quran is not difficult for the People of the Book, i.e. believers in other revealed scriptures. The only difference between the Quranic call and former divine scriptures lies in the fact that the Quran has purified the religion of God of all human interpolations. Then why is it that many people deny the call of the Quran? It is because the Quranic call does not appear to them to be a serious matter, vis à vis their self-styled concepts by which they feel that they have safeguarded themselves from the fire of hell. It is as a result of this mindset that they think that, even if they do not recognize the truth, their salvation is still not at risk. But when the divine scales are put in place, they will realize how deluded they were in their wishful thinking.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.