Sure Al-Baqara

2:51

وَإِذْ وَٰعَدْنَا مُوسَىٰٓ أَرْبَعِينَ لَيْلَةًۭ ثُمَّ ٱتَّخَذْتُمُ ٱلْعِجْلَ مِنۢ بَعْدِهِۦ وَأَنتُمْ ظَٰلِمُونَ

Und als Wir Uns mit Musa auf vierzig Nächte verabredeten, da nahmt ihr dann nach ihm das Kalb an, womit ihr Unrecht tatet.

Tafsir 2:51

Also, remember that the forty nights appointed to Moses were from the blessings of Allah, in which the revelation of the Torah, with its light and guidance, was completed. Yet you went and worshipped the calf during that period, which made you into wrongdoers.