Abdullah bin Umar reported,

When the Prophet ﷺ would place the deceased in the grave, he would say, "In the name of Allah, and upon the way of the Messenger of Allah."In another narration, "And upon the religion of the Messenger of Allah."

Azami 11109

Sahih

عن ابن عمر

أن النبي ﷺ كان إذا وضع الميت في القبر قال: بسم الله، وعلى سنة رسول الله. وفي رواية: وعلى ملة رسول الله.

الأعظمي 11109صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications for illness and funerals, and what relates to them
Section
What is said when the deceased is placed in the grave
Numbering
Jami al-Kamil 11109 (2nd edition)
Azami 11109