You want prevention, not punishment!
Get an indoor kennel or crate, put a cover over it to make it a darker safe haven. and a rug inside to make it comfy.
Give your pup a little while to get used to it, feed him inside it so he associates it with good things.
Then when you go out, pop him in his crate with a filled kong to keep his interest. When you come back, instead of being apprehensive just what damage he has done you will open the door with a smile knowing he - and your home - is safe where you left him.
Google "crate training" and you will find lots of tips.
Puppies have short memories, punishing him for something he did ages ago (over 10 seconds!) will just puzzle him.
Are you taking him to training classes? They are intelligent dogs and need lots to occupy them. If the only things he can get is teeth on are things you are happy for him to chew, there'll be no problem.
All the best.