“If a child utters a sound (after being born), the funeral prayer should be offered for him and (his relatives) may inherit from him.” (Using translation from Ibn Mājah 1508)
عَنِ النَّبِيِّ ﷺ قَالَ «الصَّبِيُّ إِذَا اسْتَهَلَّ وَرِثَ وَصُلِّيَ عَلَيْهِ»