The Messenger of Allah ﷺ said, "Removing harm from the road is charity."
قال رسول الله ﷺ: وتميط الأذى عن الطريق صدقة.
Bukhari reported it in the Book of Jihad (2989), and Muslim in the Book of Zakat (1009), both through the route of Abdul-Razzaq, who said, Mamar narrated to us, from Hammam bin Munabbih, from Abu Hurairah, who said, and then he mentioned it.