Whatever forces are fighting you, if Allah (swt) is with you, you will never lose. You do not triumph by means or numbers, but rather with sincerity of faith after preparation and taking all available means and reliance on Allah (swt).
وَإِن يَخْذُلْكُمْ فَمَن ذَا الَّذِي يَنصُرُكُم مِّن بَعْدِهِ {but if He should forsake you, who is there that can aid you after Him?}: This is an answer to Abdullah bin Ubayy bin Salul, the head of hypocrisy, and to all the hypocrites in the city who started spreading rumors at that time, and behind them were the Jews, so the movement of hypocrisy in the civil society emerged from the Jews, for Allah (swt) here says to the believers: {but if He should forsake you, who is there that can aid you after Him?} When does Allah (swt) forsake you? It is clear by His saying:
يَا أَيُّهَا الَّذِينَ آمَنُوا إِن تَنصُرُوا اللَّهَ يَنصُرْكُمْ وَيُثَبِّتْ أَقْدَامَكُمْ
{O you who have believed, if you support Allah, He will support you and plant firmly your feet.} (Muhammad: 7)
Accordingly, they lost in the Battle of Uhud because they have violated the orders of Allah (swt), so if we do not take the reasons such as learning, establishing factories, establishing civilization, then we will be defeated.