One of the most complex training issues for new puppy owners and probably the #1 Subject Matter for help calls I get from my puppy buyers, are housebreaking issues and potty accidents.
Not always right away [since a lot of our pups are litterbox trained and doing pretty well when they go home] - but as they get older, more mature and/or dominant or more adventurous, and have more freedom in the home - often times pups and young adults regress. Sometimes you are not consistent with your potty training approach, or neglect to adjust the frequency of how many times a pup needs to go pee and poop or how long it can hold it in between, as they go through growth spurts, weather and eating changes.
And yes - weather has also to do with it, LOL. Summer time - it's hot, they drink more - they need to go more often. Winter time - it's cold, wet, often times still dark or dark again - and you and the dog both want to hurry back inside - so often they do not take the time to properly eliminate because they want back inside. And so do you, LOL.