How you react when you catch your dog having an accident inside your home is a huge part of a successful house training journey. Your pup should be aware that they should not use the bathroom indoors, but this should never be traumatic.
If you catch your puppy having an accident inside, make a noise that startles them (clapping, stern voice, whistle, etc. Once you have gotten their attention, quickly take them outside and allow them to finish and understand that this is the correct area to go.
Punishment does not work well with potty training. The old methods of pushing their face in their accident, shouting at them, or even spanking them, can be detrimental to the process and cause stress for your furry friend. In order for this to work, they have to feel safe and comfortable in your home, and praised each time they do the right thing!