Hello and welcome
You can't just "put the dog out" to go to the bathroom. He's still young and needs to be supervised to make sure that he does his business while he's out there, and also for his safety. Predators, thieves, and "tasty" morsels of bad stuff abound!!! He would probably do better at night if he was confined to a crate or an ex-pen with pee pads.
Good luck and be consistent!