1) Do not
punish for unwanted behaviour or "accidents". Without fanfare, quietly tidy up and use enzymatic cleaners to reduce chances of future mishaps in that area.
use an abundance, perhaps even an over-abundance of positive reinforcement (ie: lots of treats / praise) each and every time the puppy uses the "correct" place.
Yorkies, especially tiny ones, are notoriously difficult to potty train. Mistakes will inevitably be made on his part. Be prepared for significant, dedicated training on your part.
On a slightly different note. Every effort should be made to get your puppy outside as often as possible and practical, just for the sake of safely and properly 'socializing' at this critical stage in his development, regardless of whether he will eventually be trained to potty inside or out. Not doing this socialization now will surely invite negative issues later in his life. If the dog is regularly outside for socialization purposes, then using that time to also potty train while you're already there would be a wise thing to do.
Being completely confined to indoors may
be fine for a slightly older, socialized dog, but not for a baby puppy IMO.