First, contact a professional trainer if you are concerned that your puppy is acting aggressively towards your child.
It is hard to say without more details, but your puppy may be barking just to play or they may be barking because they are nervous or protective over a toy.
Try having your child feed the puppy. They should also give them any new toys or chews.
Make sure your child isn’t roughhousing with your puppy. If your child plays rough with your puppy, then your puppy is more likely to bark at your child.
Respect your puppy’s boundaries. Most dogs do not like to be hugged, picked up, or kissed. If your child is doing these things, your pup might be telling your child that they are uncomfortable.
Do not yell at your dog if they bark or growl. They will learn that saying they are uncomfortable will get them in trouble, so the next time they won’t warn you, they will just react.
If your dog does bark for attention, remove all attention from them. Stop playing. Look away. Walk away. They will soon learn that barking means all attention will be removed.