Steadfastness comes from Allah, who makes firm the hearts of the believers: this idea runs through these verses. They mention the believers made firm in battle, the Messenger ﷺ strengthened in the face of the disbelievers, the revelation sent down to make firm those who believe, and what consolidates faith in the soul: spending in the way of Allah and bearing the hardship of obedience.
Verses gathered from a topical index of the Quran, in Mushaf order; every verse is quoted in full.
[Remember] when He overwhelmed you with drowsiness [giving] security from Him and sent down upon you from the sky, rain by which to purify you and remove from you the evil [suggestions] of Satan and to make steadfast your hearts and plant firmly thereby your feet.
Allāh has already given you victory in many regions and [even] on the day of Ḥunayn, when your great number pleased you, but it did not avail you at all, and the earth was confining for you with [i.e., in spite of] its vastness; then you turned back, fleeing.
Allāh keeps firm those who believe, with the firm word, in worldly life and in the Hereafter. And Allāh sends astray the wrongdoers. And Allāh does what He wills.
Say, [O Muḥammad], "The Pure Spirit [i.e., Gabriel] has brought it down from your Lord in truth to make firm those who believe and as guidance and good tidings to the Muslims."