^
I don't quite agree with you. We explain to children many things they should stay away from, even if they don't understand their dangers because of their age. For example, after parents tell a child about the dangers of electric current, he stays away from the electrical outlet. So if you do not want your child to gamble, you can educate him in this way. The child's behavior and passions depend more on his parents.
But at least providing more knowledge about gambling and the effects of gambling is definitely better than teaching children to gamble as directed by @Rufsilf in my previous quote.
Giving knowledge about what gambling is and what the worst effects are and how to avoid it or do it doesn't seem too much of a problem because indeed when the child grows up they also know how important such things are so they can distinguish what is good for him and what is not.
As for keeping them away from gambling, it is clear that this is very unlikely because when they grow up, especially when they are in a transition phase and always want to try something new, they will sooner or later find out, so that instead of them knowing for themselves and trying it firsthand, why don't we tell them? course from the start. As for the decision of the child to want to gamble or not when he grows up, it is his choice because we cannot also restrain children from doing something when they are adults.