Actual gambling is for adults (18+ and I think casinos are 21+). So when parents can proof the friend of their child is actively involving the child into that type of gambling they could potentially forbid the contact.
But Fortnite for example is free for kids 12 and older. There is nothing you can legally do about your child visiting a friend and playing Fortnite there.
You also can’t stop your child from coming into contact with games on smartphones other people bring to school.