For since by a man came death, by a man also came the resurrection of the dead. For as in Adam all die, so also in Christ all will be made alive. – 1 Cor. 15:21-22 (NASB)
From your question, you sound worried about a child or young one who has sinful parents. I hope the scripture above and the explanation below will give you comfort.
We are all sinners, and so are all of our parents. Since Adam sinned in the Garden of Eden all of his descendants are born imperfect and sinful (“Behold, I was brought forth in iniquity,
And in sin my mother conceived me.” Psalm 51:5 and “There is none righteous, not even one” Rom 3:10). The scripture in 1 Cor. 15:22 shows that all of Adam’s descendants have received a death sentence for their sinfulness that they inherited from father Adam. But that should not cause us to be fearful – within the same verse, we are promised that all will be made alive by Christ. Jesus promises that all that are in the grave will have a resurrection (John 5:28-29). This promise of Jesus and the words in first Corinthians let us know that a child with sinful parents will be given a resurrection because we all have sinful parents, leading all the way back to Adam. We can be thankful God’s plan accounts for everyone.