"Do not think that those who rejoice in what they have brought." They are the Jews. Al-Hasan said: They entered upon the Messenger of Allah (peace be upon him) and he invited them to Islam, but they remained steadfast in their religion. They went out to the people and said to them: What did you do with Muhammad? They replied: We believed in him and agreed with him. So Allah said: "Do not think that those who rejoice in what they have brought," meaning: they rejoiced in what was in their possession when they did not agree with Muhammad. "And they love to be praised for what they have not done; so do not think they are in safety from the punishment," meaning: in salvation from it. [Verses 190-194]
﴿لَا تَحْسَبَنَّ الَّذِينَ يَفْرَحُونَ بِمَا أَتَوا﴾ هم الْيَهُود، قَالَ الْحسن: دخلُوا على رَسُول الله ﷺ فَدَعَاهُمْ إِلَى الْإِسْلَام، فصبروا على دينهم، فَخَرجُوا إِلَى النَّاس؛ فَقَالُوا لَهُم: مَا صَنَعْتُم مَعَ مُحَمَّد؟ فَقَالُوا: آمنا بِهِ ووافقناه، فَقَالَ الله: ﴿لَا تَحْسَبَنَّ الَّذين يفرحون بِمَا أَتَوا﴾ يَقُول: فرحوا بِمَا فِي أَيْديهم حِين لم يوافقوا مُحَمَّدًا ﴿وَيُحِبُّونَ أَنْ يُحْمَدُوا بِمَا لَمْ يَفْعَلُوا فَلا تَحْسَبَنَّهُمْ بِمَفَازَةٍ مِنَ الْعَذَابِ﴾ أَي: بمنجاة. [آيَة ١٩٠ - ١٩٤]