Puppies are too immature to handle temptations. Depending on the breed, most dogs begin to gain the maturity to handle short stints with mild temptations when they're about 6 months old. Consider the analogy with a baby, where you keep it in a crib, stroller, or pen if you are not holding it. It is essential to puppy-proof your home. You should think of it in the same way as child-proofing your house but be more thorough about it.
Puppies are smaller and more active than babies and have sharp teeth and claws.
Things of especial concern are electric wires. When puppy proofing your home, get down on your hands and knees and consider things from this angle. What looks enticing, what is breakable, what is sharp, etc. The most important things are watching the puppy and of course, crating it or otherwise restraining it when you can't watch it. Another step in puppy proofing is house proofing the puppy.