Abu Musa Al-Ash'ari (May Allah be pleased with him) reported:
When the Prophet (ﷺ) had any fear of an enemy, he used to supplicate: "Allahumma inna naj'aluka fi nuhurihim, wa na'udhu bika min shururihim (O Allah! We put You in front of them, and we seek refuge in You from their evils)."[Ahmad and Abu Dawud]. (PT)
App reference (PT): Book 12, Hadith 43 (PT)
Arabic/English book reference (PT): Book 12, Hadith 1327 (PT)