Short answer: When a dog who used stairs suddenly refuses them, treat it as a possible pain or health signal first. Call your vet before any training.
Rule out pain and slipping first
Difficulty with stairs can be linked to pain, arthritis, weakness or a nerve problem in dogs. If the change is sudden, if your dog yelps, limps, drags a leg or seems stiff, call your vet. Do not carry on with treats and coaxing until a vet has had a look.
Also look at the stairs themselves. Smooth wood or tile can be slippery, a new runner or a changed light can make steps look different, and a noisy or wobbly step can put a dog off.
Make stairs easier while you wait
Add non-slip treads or a runner, keep the stairs well lit and trim long nails and hair on the paws. If your vet says your dog is physically fine, you can reward one step at a time on a loose leash and end while it is still easy. Never push, pull or force a worried dog up or down.
For older dogs, a gate to limit stair use and a ramp or another option may be kinder than asking them to keep climbing.
Sources & care notes
Sources: River Valley Veterinary: My dog is struggling to climb stairs. Humane Society Silicon Valley: Desensitization, getting your dog used to something slowly.
This article is general education, not veterinary advice. If your dog seems unwell, is in pain, or something changed suddenly, call your vet. If it could be an emergency, do not wait.