The vast majority of "behavior problems" are normal behaviors happening in inconvenient places. Solving them is less about discipline and more about redirecting.
Identify the function
Every behavior pays off somehow — attention, food, escape, fun. Find what your pet is getting out of it, and either change what they get or give them a better way to get it.
Manage the environment
You can't train a problem out of a setup that constantly rewards it. Close the counter-surfing dog out of the kitchen while you're cooking; the problem fades when it stops paying off.
If a behavior appears suddenly, rule out medical causes first. Pain shows up as crankiness, hiding, or unprovoked snapping more often than people realize.