This refers not to a young child but to a youth who was a continual drunkard and was persistently rebellious, stubborn, gluttonous, and disobedient (which describes many contemporary teenagers). If a son consistently refused to abide by his parents’ authority, the men of the city were to enforce swift capital punishment.
However, there is no record in Scripture of even one rebellious youth in Israel being put to death by stoning. The Law of Moses was read to all of Israel, so no doubt all children were made aware of this law’s terrifying threat before they reached their teenage years. (That it was an effective deterrent shows God’s wisdom in setting such a harsh penalty.) In contrast, each year in the U.S. thousands of youths die through drunk driving, violence, alcohol poisoning, drug abuse, etc., as a tragic result of their rebellious lifestyles.
That same merciless Law of Moses will judge all of humanity on the Day of Judgment. However, Jesus took our capital punishment upon Himself so that we could leave the courtroom without suffering the consequences of our sins. All that God requires of us is that we repent of our stubborn, rebellious, and disobedient lifestyle and trust in the Savior before the great stone of God’s Law falls on us and grinds us “to powder” (see Luke 20:18).
Deuteronomy 21:18 “If a man has a stubborn and rebellious son who will not obey the voice of his father or the voice of his mother, and who, when they have chastened him, will not heed them, 19 then his father and his mother shall take hold of him and bring him out to the elders of his city, to the gate of his city. 20 And they shall say to the elders of his city, ‘This son of ours is stubborn and rebellious; he will not obey our voice; he is a glutton and a drunkard.’ 21 Then all the men of his city shall stone him to death with stones; so you shall put away the evil from among you, and all Israel shall hear and fear.