I absolutely do not agree with being stern and giving a stern "NO." Anything which frightens a puppy will work against you in training. If you see him in the act (which you shouldn't if you're supervisng wella and taking him out often, at least every hour) interrput him with an "eh" or clap your hands, just to interupt him but not to frighten him. There are reasons why an absense of aversives in training DO work to teach. When you ask how else is he suppose to know without telling him he's done somethin "wrong"....I'll tell you how he chooses to use the out of doors without causing fear and intimidation to a puppy. And I'll tell you why punishment is contra-indicated. But first, you must understand that dogs do not understand "right" and "wrong" in a moral sense that we do. They do not have our values and do not understand why going on the carpet is a "wrong" thing. It's perfectly normal to them. In the wild, they choose their own place to go. So, why would it be "wrong" for them to go inside? Why would they be thinking about what is in our minds, our values? We have to show them and show them with gentle patience and consistancy.
First of all, if the puppy has an accident inside, it is caused by a couple of reasons. 1) He doesn't have perfect control over his bladder or bowels at this age. The urge to go can come on quickly and suddenly sometimes and perhaps not so suddenly other times. He's still developing physically as well as mentally. 2) Until a dog has had a strong history of reinforcement for a behavior, he is guessing. He goes in your livingroom and gets scolded sternly. Ok.....does he know that you mean going in the living room is morally wrong or could he think going in front of you is scary? Or does he think that this room is not a safe place to go, maybe I'll try behind the furniture or the guest room. So he goes in the guest room next time since the other room brought bad results. Or since he got scolded for going to the bathroom, is going to the bathroom the scary thing? Should he not go to the bathroom at all and just hold it until he can't hold it any longer? Or hide it behind the couch? When you take him out, is he going to stop going in front of you since he got scolded while going in front of you before? How is he suppose to know that you meant not to go on the carpet indoors? He is guessing for a long time. You manage to let him outside and he goes and gets praised and a cookie a few times. Good things happen outside. But....and this is important....just because he gives a few correct responses and he gets good things outside doesn't mean he's had ample reinforcement over a long enough period of time to get the behavior reliable. After all, he has been reinforced a few times for going inside too, reinforcement meaning, it's easy, its warm, soft carpet (dogs like absorbant places). It worked. Dogs do what works. He is still guessing. When there has been a strong history of reinforcement for going in the only place....(outside) what will he tend to choose? The place where he's gotten treats and praise lots of times? Or the place where he has NOT gotten treats and praise? What muddies up the water is that just being able to relieve himself is also a reinforcer and going on the carpet is easy, absorbant and comfortable. It is also reinforcing. So you have to make the outside the ONLY place where he gets a payoff. And it has to happen for a long time....he's only 13 weeks old.
Now....if he is prevented from going inside at all but is given good things when he goes outside it makes the list of places to go easy. The list of where NOT to go (inside) is much, much longer. He guesses one room, then another, then behind the couch, then maybe in the back bedroom. But if outside is the ONLY place where he goes, that makes the choices a lot more narrowed down.....only one place where he gets wonderful things; praise/cookies, a party. But it takes many repititions to build a behavior, just as it takes an athelete many repititions to build muscles. It also takes some maturity on your puppies part.
Stern punishment (whether it's to the point of abuse or not) undermines your puppy's trust in you as his teacher. It erodes the relationship. It causes a puppy to distrust you enough that he is unable to learn things as well because he is thinking of ways to avoid an aversive instead of thinking of ways to earn a reward. When you prevent unwanted behavior by setting up the environment for success (and there are many ways of doing this) and you reinforce wanted behavior, the wanted behavior will be repeated and the unwanted behavior will extinguish. This is behavioral law. It is not necessary to use aversives, stern "no" to train a dog. A negative reward marker is often used....that is...you let the dog know that....."That wasn't it, try this instead." But that does not mean intimidating or making the puppy nervous with a stern voice which can frighten a young puppy especially. You can read more about a no reward marker if you decide to study a little bit of operant and classical conditioning. There is a very specific way to teach the dog what that means.
If you read the sticky in the training forum about potty training, there are some very thorough tips. It sounds like you're doing quite well but there's room for even more supervision. It's a tough road with a puppy but when they do make an accident, it is not their fault, but rather the owner's for slipping up on supervision. If you just remember that the list of where not to go (or what not to do with other behavior) is much, much longer than the list of what TO do. It's much less complicated to prevent unwanted behavior and to make sure there is no payoff for unwanted behavior. When there is a payoff, the behavior will be repeated. When there is no payoff or (reinforcement) the behavior WILL extinguish. That is behavioral law, as surely as an apple falling off a tree is a law of physics....gravity.(A reinforcer is not always something we provide. Some behaviors are self reinforcing.)