Why does a puppy want to chew on electrical cord? Because he is bored and full of energy. When you are raising a puppy, you have to watch them at all times, until they know what acceptable behavior looks like in the house. The pup should be with you in the same room, so that you have the control to stop the unwanted behavior.
Whenever the puppy goes after an electrical cord (or any other item you don't want them to chew on), you have to say a firm "no", and redirect - distract them with one of their own toys. Praise like crazy as soon as the pup grabs on to the allowed object. If you stick with this routine, your dog will learn the objects that are off limits, and will go after their own toys. Depending on a breed and age of the dog, it might take less or more time to teach the dog what is allowed. Our Rottweiler pup stopped going after laundry and bedsheets after about 4-5 months of age.
Best of luck!