Sahih Muslim, Book 11, Hadith 98 (Muslim 2198)

It is narrated on the authority of Abu Sa'id al-Khudri that the Prophet (ﷺ) said:

When you follow a bier, do not sit until it is placed on the (ground).