The Messenger of Allah ﷺ said, "Whoever prays over a funeral receives one qirat, and whoever waits until the body is placed in the grave receives two qirats. The two qirats are like two great mountains."
أخبرنا نوح بن حبيب قال أنبأنا عبد الرزاق قال أنبأنا معمر عن الزهري عن سعيد بن المسيب
قال رسول الله ﷺ من صلى على جنازة فله قيراط ومن انتظرها حتى توضع في اللحد فله قيراطان والقيراطان مثل الجبلين العظيمين
Reported by Muslim, Funerals, chapter on the merit of praying over the funeral and following it, no. 945, from the hadith of Abdul-Razzaq, and Bukhari 1/177 (Indian edition), and Tuhfat Ashraf 10/248, from the hadith of Mamar, by this route, and it is in Kubra, no. 2121.