My dog's previous owners used a vibrating anti bark collar on him. They also managed to turn him into a nervous wreck who was too scared to bark.
I don't know exactly what happened in his first home, so I can't say the exact extent to which the vibrating anti bark collar caused it, but I do know that it was only when he relaxed that he started to bark again - at normal things, like the doorbell - and that was part of his healing journey.
He had ten months with his previous owners, and presumably less than that with the vibrating anti bark collar, and 5 years with me, input from properly qualified behaviourists, and we're still dealing with anxiety issues that will never be fully resolved.
Please don't use one.
Some barking is entirely normal dog behaviour, and you should never seek to completely prevent it - any more than you would stop children from shouting in an appropriate context.
But - reducing it by identifying why the dog feels the need to bark and removing those causes will help. For instance, mine will bark at passersby at the front window; keeping the blinds shut or using window film prevents the dog from feeling the need to bark.
If your dog has learned that barking can be used to demand something (for instance, waiting for food or the ball to be thrown), wait until the dog has stopped barking before giving them the thing they want. They will soon learn that barking doesn't work.
I also fetch mine in from the garden the moment he starts barking; he's learned that will happen and it has vastly reduced the barking (he only does it now when he feels it's really necessary, mainly when the neighbours barking dog sets him off).