I don't think it's possible to completely remove gambling ads from children unless social media platforms themselves remove. Although social media platforms know the age when an account is initially created. If they genuinely want to remove these ads, they can try to stop those accounts from seeing any such ads, but I don't know if that would be possible. But it's certainly possible to reduce it to a certain extent, but it's never going to be possible completely. So like others, I would agree that even if it's not eliminated, it should be done to keep minors away from it.
Some European countries are already banning social media for teenagers, which is likely to reduce the influence of questionable content on children. But let's be honest with ourselves: modern children can bypass all these restrictions and blocks in two clicks. Of course, for some, these bans will be a serious obstacle, but for most, they will not.