← Sahih Muslim
Sahih Muslim · Hadith #6600 · The Book of Destiny

Abu Huraira reported that Allahs Messenger (way peace be upon him) was asked about the children of the polytheists who die young. Thereupon Allah's Apostle (ﷺ) said:

حَدَّثَنَا ابْنُ أَبِي عُمَرَ، حَدَّثَنَا سُفْيَانُ، عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ سُئِلَ رَسُولُ اللَّهِ صلى الله عليه وسلم عَنْ أَطْفَالِ الْمُشْرِكِينَ مَنْ يَمُوتُ مِنْهُمْ صَغِيرًا فَقَالَ ‏ "‏ اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ ‏"‏ ‏.‏

It is Allah Who knows what they would be doing.