Howling, barking and a chewed door while the owner is out is almost never revenge or naughtiness. A dog is a social animal, and being alone is not a neutral state for it but anxiety. Some tolerate it calmly; others do not.
How to tell anxiety from boredom
A bored dog starts making noise after an hour or two, and does it in bursts. An anxious dog starts within the first fifteen minutes after the door closes and does not stop. The signs: drool on the floor, damage specifically at the exit, puddles by the door from a dog that normally holds it. Checking is easy — set up a camera or leave your phone recording.
What helps
Leave and return as a non-event. Long goodbyes and an ecstatic reunion turn departure into an occasion. Get dressed, go out, come back — no scene.
Break the signals. The dog knows: keys, coat, shoes mean leaving. Pick up your keys and sit down to watch television. Put your coat on and stay. After a week those things stop being an alarm.
Start with seconds. Step out for ten seconds and come back while the dog is still calm. Then a minute, then five. You must return before it starts howling, not after — otherwise you reinforce the howling itself.
Walk it before you go. A tired dog sleeps rather than patrolling the flat. A real walk, not ten minutes by the entrance.
Give it a job. A food toy that has to be worked at keeps a dog busy and ties your departure to something good.
What does not work
Telling the dog off for the damage when you get back. It will not connect the punishment with something it did two hours ago — it will connect it with your arrival, and things will get worse.
Getting a second dog in the hope that two will not be bored. Sometimes it helps; more often you get two howling dogs.
When you need a specialist
If the dog injures itself — breaking nails on the door, damaging its muzzle — training on your own will no longer be enough. That is a job for a trainer, and in severe cases for a trainer and a vet working together.