Whether it’s the gradual onset of dental disease, or the sudden stink of a hot spot, any new or pungent odor is worth a visit to the vet. A worse-than-average smelling dog is often suffering from an anal gland issue, or an infection of some kind (skin, ear, mouth, etc). The sooner you can narrow down the cause, the sooner you can get it cleared.
If you find your stinky dog is a repeat offender (ie: the issue keeps coming back), talk to your vet about a preventive healthcare plan. There are lots of great products out there including medicated shampoos, ear cleansers, diet, and supplements.
Ask your veterinarian to point you in the right direction based on your pet’s particular issue.