I take the somewhat contrarian view: kids (at some age) need to learn to cope with absolute limits that are strictly enforced. How else will they cope with living in real society? Not paying your rent will get you kicked out. Driving over the speed limit will get you a ticket, or worse. Not showing up to an exam in college means you fail the class.
Not saying you should have draconian rules on everything. But some rules need to be enforced with (reasonable) consequences. Otherwise you are doing your children a disservice, IMHO.
My kid has limited screen time that is strictly enforced, roughly 30 minutes a day. They're well aware of this fact and when it will happen.
We occasionally make exceptions for things like movies or what have you on the weekends.
In my experience my parents issued blanket bans and the threat of punishment for eating sugary foods, using the internet and watching TV. All this did was cause me to binge on all three whenever I had the opportunity at a friend's house, and that behavior extended into my adulthood until I was able to break free of my parents and seek the advice of reasonable adults to help curb my addictive behaviors.
When I discussed this with my parents they doubled down on their behavior, washed their hands of responsibility and blamed me. They used the same tired "how you behave when you are an adult is up to you" line. I hope you aren't doing the same to your children.