After the sin of the Golden Calf, God told Moshe that he was going to destroy the Jewish people.
After Moshe destroyed the Golden Calf he then went back up to Har Sinai to plead for the people (Shemot 32:30-32).
Moshe pleaded with HaShem that the Divine Presence would remain with them. Here is part of that exchange (translation from Judaica Press):
If it’s possible for a whole nation to have a bad hair day, then the Jewish people had one.
The people were confused about when Moshe would return from Har Sinai. They got anxious and urged Aharon to make a visual representation of God (Shemot 32: 1-6).
This is the event that is called Cheit HaEigal or the Golden Calf.