To be an effective trainer, correction or praise should occur when the dog is in the act of the behavior you are trying to eliminate or reinforce.
That way, the dog can connect his behavior to your reaction. Most dogs want to please their owners and if your timing is spot on, your dog will quickly learn how to act like a perfect pet!
If your dog does something wrong and you don’t catch him in the act then do not correct him. Dogs have short term memory, very short. If he does something wrong and you come in even a few seconds after the fact (even if he “looks” guilty) and punish him, he will have no idea why he is being punished. In other words, if you don’t catch him in the act, you’re out of luck!
If your dog has a tendency to get into trouble when you aren’t looking, put him in a crate or on leash when you can’t devote 100% of your attention to him. This way if you get distracted, are answering email, gardening, etc., you’ll still be able to keep an eye on him and catch him right away if he gets into mischief.
Always be aware of what your dog is doing. Be PROACTIVE and reward appropriate behaviors rather than waiting until your dog is doing the unwanted behavior and correct. It’s far better for you both if you do some preventative training and management for you dog.