Jabir (May Allah be pleased with him) reported:

The tribe Banu Salimah wanted to move nearer to the mosque. On learning this Messenger of Allah (ﷺ) said to them, “I heard that you intend to move nearer to the mosque”. They said, “That is so, O Messenger of Allah, we do want to do that”. He said, “O Banu Salimah, keep to your homes, your steps (to the mosque) are recorded”.

[Muslim]

Note: Shaykh Bin Baaz rahimahullah mentioned this aforementioned reward similarly applies to using a vehicle to drive to the Masaajid from one’s home.

[Reference]

Mentioned by

AbdulFattaah Bin Uthman
Abu Fajr