Requires vigilance and persistence on your part. Develop a routine
Restrict where puppy can get to while he is being potty trained (you can use a pen or baby gates. Some people use a crate…but never leave a puppy in a crate for extended periods of time)
Take puppy outside to the same spot every time they wake up, after every meal, if they get excited, if you are expecting guests, and anytime they are sniffing around. Do it every hour or so to start with and gradually increase the time between outside visits. Do not play with puppy when you are outside for ‘toileting’.
Praise puppy copiously when he has ‘performed’ and return inside immediately.