Ezekiel 18:19

Amplified Bible (AMP)
“Yet do you say, ‘Why should the son not bear the punishment for the father’s sin?’ When the son has practiced justice and righteousness and has kept all My statutes and has done them, he shall certainly live.

Read Ezekiel 18:19 in other translations