The pains that comes with losing a child, the bible has never ignored it. God understands human pains when their loved ones die. Jesus Christ loves the little children and he shows the love in the bible when he said let the little children come to me. God understands the pains and sorrows the parents pass through, it clearly shows that the death of children is not meaningless.
Matthew 19:14 “Let the little children come to me, and do not hinder them, for the kingdom of heaven belongs to such as these”
The bible made us to understand that death is part of a broken world, it is not caused by the sun the person committed. King David in the bible also lost his son, he cried and still trust in God.
He said, “I shall go to him, but he shall not return to me” (2 Samuel 12:23).