A muzzle will only prevent your dog being able to bite; but a dog wearing a muzzle can still cause injury.
Muzzles should NOT be used for things like stopping your dog from barking, chewing, or eating things off the ground or for a puppy who is play biting.
Work with a trainer for tips on how to deal with those issues.