Youtube algorithms and the most stupid smartphone games are obviously addictive, so it does make sense if parents step in with a well-considered "thou shalt not" at times. This is far from a perfect solution, but in the long run, it is very probably better than doing nothing at all. I've seen really horrible results of screen time overuse on a teen girl -- basically, a lively and clever 7yo developed into a 18yo with no social skills whatsoever, and the habit to even scroll her phone while brushing teeth!
It's like decidedly putting away those candies when you sense your child has had too much for today. The same thing. No need to punish the child's brain and coping mechanisms for the parent's inability to... parent.
Best solution, obviously, is simple parental role model: the entire family putting away smartphones for the evening. (In our case, for example, nobody in the family has a smartphone; only dumb phones here. So far, with our oldest child being 9yo, I don't notice this being a problem. He is clearly fine not having one.)
I have also observed that careful explanations of what gaming or smartphones do to the child's brain also make a lot of sense. Our son is clearly interested in these effects, so he is always setting himself timers to limit his gaming. (Doesn't always follow them, but often, nonetheless, does; I think it is the purpose that counts, not 100% execution.)
I think children need to see cause and effect of smartphone overuse already at early ages. They need to understand and feel that by reasonable, down-to-earth limiting, parents are actually protecting them and their brain.