Proverbs 22:6 is often used as both a promise and an indictment: "Train up a child in the way he should go: and when he is old, he will not depart from it." The Hebrew word for "train" — chanak — means to dedicate, to initiate, to create the first taste. The proverb is a general principle, not a guarantee that applies mechanically regardless of a child's own choices. Solomon, who wrote this proverb, had children who departed significantly. Faithful parenting does not guarantee outcomes. It creates the best conditions.
Ezekiel 18:20 addresses the other direction: "The son shall not bear the iniquity of the father, neither shall the father bear the iniquity of the son." Each person stands before God in their own choices. A child's destructive choices are ultimately their own. This does not remove the grief of watching it happen. It does address the guilt that says the child's failures are entirely the parent's responsibility.
Commentary is from a charismatic Protestant perspective, drawing on KJV text and public-domain sources including Spurgeon, Andrew Murray, and Matthew Henry.