Instances where Allah (swt) rebukes the Companions.
3:165: Allah (swt) blames the defeat at Uhud on the companions, stating it occured because of their disobedience. Ali' Imran 3:165
Translation: Dr. Mustafa Khattab, the Clear Quran

Why is it when you suffered casualties ˹at Uḥud˺—although you had made your enemy suffer twice as much ˹at Badr˺— you protested, “How could this be?”? Say, ˹O Prophet,˺ “It is because of your disobedience.” Surely Allah is Most Capable of everything.

أَوَلَمَّآ أَصَبَتْكُم مُّصِيبَةٌۭ قَدْ أَصَبْتُم مِّثْلَيْهَا قُلْتُمْ أَنَّىٰ هَذَا ۖ قُلْ هُوَ مِنْ عِندِ أَنفُسِكُمْ ۗ إِنَّ ٱللَّهَ عَلَىٰ كُلِّ شَىْءٍۢ قَدِيرٌۭ

Reference  : Quran: Ali' Imran 3:165