You should let your puppy out every one-two hours. If you cant be home and the puppy is very young, have a friend come and let it out or take it to a doggy day care for the day. You should also section off one part of the house for the puppy to stay in. Like your kitchen. And WHATCH them. If they are sniffing, CARRY them outside.
You should NEVER scold your puppy after an accident has happened. You have to catch them in the act before you can. If you scold them after words they wont know what they have done wrong.
If its an older puppy and you have to be gone during the day, take them outside one last time before you go to wherever and DONT let them get a drink. Put a SMALL amount of water in its crate. When you get home, IMMEDIATLEY take them outside, then check the crate for any accidents. Again, DONT SCOLD THEM!
Good luck I hope that helps!!
Also you can buy a spay.when you spay it in a sertan place they will want to go the toilet there it really helped with my 5 mouth old puppy