وَاِذْ
قَالَ
مُوْسٰی
لِقَوْمِهٖ
یٰقَوْمِ
اِنَّكُمْ
ظَلَمْتُمْ
اَنْفُسَكُمْ
بِاتِّخَاذِكُمُ
الْعِجْلَ
فَتُوْبُوْۤا
اِلٰی
بَارِىِٕكُمْ
فَاقْتُلُوْۤا
اَنْفُسَكُمْ ؕ
ذٰلِكُمْ
خَیْرٌ
لَّكُمْ
عِنْدَ
بَارِىِٕكُمْ ؕ
فَتَابَ
عَلَیْكُمْ ؕ
اِنَّهٗ
هُوَ
التَّوَّابُ
الرَّحِیْمُ
۟
3

This verse describes the special mode of offering their Taubah توبہ (repentance) which was prescribed for the Israelites in this situation, -- that is to say, those who had not indulged in the worship of the golden calf should execute those who had. Similarly, in the Islamic Shari'ah too, certain major sins necessarily entail capital punishment even when the sinner has offered this Taubah توبہ -- for example, life in return for a life in the case of intentional homicide, or death by stoning in the case of adultery established through proper evidence.

Then the Israelites acted upon this divine commandments, they became worthy of receiving the mercy and favour of Allah in the other world.