Sure Aal-i-Imraan

3:127

لِيَقْطَعَ طَرَفًۭا مِّنَ ٱلَّذِينَ كَفَرُوٓا۟ أَوْ يَكْبِتَهُمْ فَيَنقَلِبُوا۟ خَآئِبِينَ

damit Er einen Teil derjenigen, die ungläubig waren, abtrennte oder sie niederwarf, so daß sie enttäuscht umkehrten.

Tafsir 3:127

Your victory in the Battle of Badr was because Allah willed that a group of the disbelievers be destroyed, and another be humiliated, frustrating them through defeat so that they withdrew.