Coaster brakes can make it easy to slow down or stop by back-pedaling. On the other hand, coaster brakes add weight and your child will still need to learn to use a hand brake when they move to the next size bike. Many kids’ bikes have a hand brake in addition to coaster brakes or just left the coaster brake off altogether in favor of hand brakes. Having both coaster brakes and hand brakes can be useful if your kid isn’t strong enough to only use hand brakes, but you want to get them started on learning how.
Some bikes that have coaster brakes also have a freewheel option so you could take it to the shop to get rid of the coaster brake once your kid is fine with just using their hands. Once your kid starts riding real trails, disc brakes can help them with increased control and stopping power.