The Prophet ﷺ said: “Whoever attends a funeral until the prayer is offered has one qīrāṭ of reward, and whoever attends until burial has two qīrāṭs — each qīrāṭ is like (the mountain of) Uḥud.” (al-Bukhārī & Muslim).
العربية: عن أبي هريرة رضي الله عنه أنّ رسول الله ﷺ قال: «مَن اتّبع جنازة مسلمٍ إيمانًا واحتسابًا، وكان معه حتى يُصلّى عليها ويُفرَغ من دفنها، فإنه يرجع بقيراطين، كل قيراطٍ مثل أُحُد». (البخاري ومسلم).
When a Muslim passes, pray the janāzah and follow to the burial — mountains of reward.