It was narrated from Abu Hurairah that the Messenger of Allah ﷺ offered the funeral prayer, then he came to the grave of the deceased and scattered three handfuls of earth from the side of (the deceased’s) head.
أَنَّ رَسُولَ اللَّهِ ﷺ صَلَّى عَلَى جِنَازَةٍ ثُمَّ أَتَى قَبْرَ الْمَيِّتِ فَحَثَى عَلَيْهِ مِنْ قِبَلِ رَأْسِهِ ثَلاَثًا