The van pulls up, and your dog is at the window in seconds, barking hard enough to shake the glass. The driver walks back to the van and leaves. Your dog looks victorious.
From your dog's side, that is exactly what happened. Something arrived that should not be there, they said so loudly, and it went away. Every single time.
Why this is one of the hardest barks to change
A delivery driver's whole job is to arrive and leave quickly. The bark gets rewarded on 10 deliveries out of 10, a stronger pattern than almost anything you can offer in return.
This is not aggression and it is not your dog protecting the house against a genuine threat. It is a habit that has never once failed to work.
Today: change what your dog can see
You cannot out-shout a pattern that has been rewarded for months. You can change the view, and that does more in one week than arguing with the bark.
Cover the lower half of the window your dog watches most, with frosted film or a blind at half height, or move the furniture back.
Close the curtains or blinds in the hour your deliveries usually arrive, if you know the pattern, rather than after the barking starts.
Put your dog behind a closed door or a baby gate, with a chew, at the time a delivery is expected. A dog who cannot rehearse the bark is not getting better at it.
Give the driver's arrival a different job
Once the window is managed, teach a job that competes with barking at the glass. This is the training half of the work.
Pick a spot away from the window, such as a mat by the kitchen. Build your dog's habit of going there for a treat, with no van involved, until it is easy and familiar.
Record an engine or a knock on a doorbell app at low volume, played with nobody arriving. Reward your dog for going to the spot rather than the window.
Once that is solid, ask for the spot the moment a real delivery arrives, before your dog reaches the window, and feed several treats there.
Working at a volume and distance your dog can still take treats at is what makes this stick. If they cannot eat, they are too close to the window or the sound is too loud.
On the day itself
Answer the door yourself with your dog on a leash or behind a gate, rather than letting them get there first. First to the door is practice for next time.
Say nothing while the barking is happening. Talking or shouting over it reads to your dog as you joining in, and it often makes the next van louder.
Once the driver has gone and your dog is quiet, feed a few treats on the mat. You are rewarding the return to calm, not the departure itself.
Relaxation near the door is trained as its own behaviour, in short repeatable sets, the same way any other Skill is built.
Safety note
This is ordinary alert barking at something outside. Some barking is not that. A dog who lunges at the door, growls when a person enters, or has ever made contact with a visitor needs help first. Speak to a veterinarian and a qualified behaviour professional.
Today's version, in one line: cover the window at delivery time, and build the mat spot before the next van arrives.