“The Prophet (ﷺ) said: ‘Offer the (funeral) prayer for your children, for they have gone ahead of you (i.e. to prepare your place in Paradise for you).”
Sunan Ibn Majah Book 6, Hadith 77