( وَإِذْ يَعِدُكُمُ اللَّهُ إِحْدَى الطَّائِفَتَيْنِ ) (([Remember, O believers], when Allah promised you one of the two groups): The two groups were either to seize the caravan of the polytheists or there would be a battle. So, the choices before the believers were either to recover their wealth and possessions, or to achieve victory over the polytheists through a battle.
( وَتَوَدُّونَ أَنَّ غَيْرَ ذَاتِ الشَّوْكَةِ تَكُونُ لَكُمْ) (and you wished that the unarmed one would be yours): To wish for something is wanting it to happen.
(The unarmed one would be yours) meaning they hoped to retrieve their wealth without engaging in a battle, just by seizing it from the caravan. But:
( وَيُرِيدُ اللَّهُ أَن يُحِقَّ الْحَقَّ بِكَلِمَاتِهِ ) (But Allah intended to establish the truth by His words): The first truth is the victory of the small group of believers, and the second truth is to make Islam victorious over polytheism. This was the first victory of truth over falsehood.
(by His words): The commands of Allah (swt) and what He (swt) wills.
( وَيَقْطَعَ دَابِرَ الْكَافِرِينَ ) (and to eliminate the disbelievers): Allah’s promise is to cut off the roots of the disbelievers, leaving no descendants or successors behind.