When a house-trained puppy has accidents
A new accident is information, not a reason to punish your puppy. A health problem, a change in routine or incomplete training can all affect toilet habits.
Start with a health check
Contact your veterinarian about a sudden change, frequent urination, pain or blood. If your dog strains without passing urine, seek urgent veterinary help.
Make the routine easier
Offer regular outdoor breaks, especially after waking, eating and play. Stay nearby and reward toileting in the right place. Supervise indoors and gradually expand access as your puppy succeeds.
Clean accidents with a pet-appropriate enzymatic cleaner. Do not scold after the event; it will not tell your puppy where to go next time.
Further reading: VCA: house soiling.