“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.” Ezekiel 18:20
In ancient times there was a common belief that the sins of the father (or mother) would fall upon the children.
The prophet Ezekiel is keen to dissuade the Israelites of this false belief, and the entirety of chapter 18 is spent doing just that. It is understandable why this belief was so common: children do in fact often suffer from the sins of their parents.