Whats the best way to punish a dog?
Be consistent. Say “No” in a disapproving tone without raising your voice unless the animal appears to not notice you are there. Maybe a gentle rap on the nose area with one sheet of rolled-up newspaper. Any non-fattening behavior of yours that causes tail-wagging can be used to reward the desired behavior. This could go on for months even with a reasonably smart dog. If the animal is truly dumb or has an un-trainable type of personality (see some human personalities for examples of this) then at some point you will need to give up and take the animal to the pound to be euthanized or something.