It’s unlikely to cause any kind of large black market. In the UK, energy drinks have been restricted to 16+ for a few years now. People don’t mind off brand vapes or cigarettes (for some reason), but people absolutely care about the brand of energy drink they are buying. Kids especially, I imagine most only buy them to look cool, and if no one knows you are drinking a “cool” energy drink then why bother?
That's a good thing, that's less total caffeine they ingest. Which is the entire point. To reduce easy access to high dose caffeine. The kids could just huff coffee if they really wanted, no solution needs to be perfect to have an effect.
I'm not saying it's bad or good, I'm just saying that Poland will need to do more than just restrict sales to minors if they want to have long term success with this.
No energy drink is as cool as the one with the skulls on the can that glows in the dark and is laced with Chinese research chemicals you can only get one the dark web or from your older brothers friend that believes there's a Nazi base on the moon.