It was narrated that Abu Hurairah said: "The Prophet ﷺ said: 'Offer the (funeral) prayer for your children, for they have gone ahead of you (ie to prepare your place in Paradise for you)".
The Prophet Muhammad also taught us that when someone dies, we should pray for them with sincerity and humility so that Allah may forgive their sins and grant them mercy in the afterlife. We should also remember our own mortality so that we can live our lives according to His teachings while we still have time on earth. Finally, this hadith reminds us of the importance of having faith in Allah’s plan and trusting Him even when faced with difficult times such as death or loss.