And you did not kill them, but it was Allāh who killed them.1 And you threw not, [O Muḥammad], when you threw, but it was Allāh who threw2 that He might test the believers with a good test.3 Indeed, Allāh is Hearing and Knowing.
Translation: Saheeh International (English)
1 i.e., Your strength was insufficient to overcome them, but Allāh supported you and gave you victory.
2 When the Prophet (ﷺ) threw a handful of dust into the faces of the disbelievers, Allāh caused it to fill the eyes and nose of every soldier, preventing their advance.
3 So that they would appreciate Allāh's favor to them.
For you did not O believers, kill the idolaters on the day of Badr because of your power and might, but rather Allah supported you in that. And you O Prophet did not throw sand at the idolaters, rather it was Allah, Who made what you throw reach them. Allah tested the believers by blessing them with victory over their enemies, despite their small numbers of fighters and weapons, so that they might be thankful to Him. Indeed Allah listens to your prayers and what you say, and He knows what you do, and what is best for you.