Sure Ghafir

40:85

فَلَمْ يَكُ يَنفَعُهُمْ إِيمَٰنُهُمْ لَمَّا رَأَوْا۟ بَأْسَنَا ۖ سُنَّتَ ٱللَّهِ ٱلَّتِى قَدْ خَلَتْ فِى عِبَادِهِۦ ۖ وَخَسِرَ هُنَالِكَ ٱلْكَٰفِرُونَ

Aber nicht mehr nützen konnte ihnen ihr Glaube, als sie Unsere Gewalt sahen - (so war) Allahs Gesetzmäßigkeit, die bereits (in der Vergangenheit) an Seine Diener ergangen war, und verloren waren da die Ungläubigen.

Tafsir 40:85

So their bringing faith upon seeing the punishment descending upon them, did not benefit them. This is the way of Allah that has been consistent among His servants: that their bringing faith upon seeing the punishment is of no use. The disbelievers doomed themselves at the time when the punishment descended, by having put themselves in a place of destruction because of their disbelief in Allah and not repenting from it before seeing the punishment.