Some dogs run to an entrance and bark when a doorbell rings.
If you keep your dog in your house, your dog will have a very strong alert instinct in your house because the house is the nest for him.
When the doorbell rings, a stranger will come in from the outside, so he is trying to eliminate it, so he barks.
Even if it's not a thief, but your friend, a postman, a paperboy, or any other friendly person, he will consider them as outsiders, who do not belong to his herd.
Also when a phone rings, he will get excited and bark at the stimulus coming from the outside.
Barking at the unexpected noise is unavoidable for him due to the alert instinct, but you have to control it.
To stop him from doing that, the punishment method is effective.
The punishment method is a method of causing physical discomfort to the dog without being noticed that the punisher is doing it intentionally, like throwing an empty PET bottle toward the dog (be careful that it does not hit your dog) or hit the floor with an empty tissue box.
If you take good leadership on a regular basis, he will not bark, understanding that he does not have to be cautious and the herd will be protected by you.
If you do not always show leadership, his alert behavior will escalate more and more, so be aware of taking leadership on a daily basis.