I assume this is about unsupervised rides. It totally depends on the kid, location, and expected usage. I would not recommend an ebike as a straight up replacement for a kid's bike because, if you give a kid the extra range and speed of an ebike, they will take advantage of it. Suddenly they may be many miles from home, in traffic, in unsafe areas. In traffic, ebikes require a level of maturity and judgement approaching that required for driving a motorcycle or car.
I would only consider an ebike for a very trustworthy child, and only if they have a need to get somewhere important on their own, on safe routes, that wouldn't be feasible on a regular bike.