I've literally had nobody that was properly able to answer this.
In Ezekiel 18:20 it is quoted " The one who sins is the one who will die. The child will not share the guilt of the parent, nor will the parent share the guilt of the child. The righteousness of the righteous will be credited to them, and the wickedness of the wicked will be charged against them."
2 Samuel 12:10 however God directly kills David's son for his adultery and David's other children "Now, therefore, the sword will never depart from your house, because you despised me and took the wife of Uriah the Hittite to be your own." and 2 Samuel 12:14 "But because by doing this you have shown utter contempt for the LORD, the son born to you will die."
In Ezekiel 18:20 it is quoted " The one who sins is the one who will die. The child will not share the guilt of the parent, nor will the parent share the guilt of the child. The righteousness of the righteous will be credited to them, and the wickedness of the wicked will be charged against them."
2 Samuel 12:10 however God directly kills David's son for his adultery and David's other children "Now, therefore, the sword will never depart from your house, because you despised me and took the wife of Uriah the Hittite to be your own." and 2 Samuel 12:14 "But because by doing this you have shown utter contempt for the LORD, the son born to you will die."