You can't, really. Chewing on things is a natural behavior. This is one of the reasons we don't have fully flighted birds.... trying to bird proof an entire house is a big task involving a lot of compromise on the part of the humans and any other pets. And while you
may be able to dissuade one or two specific behaviors using some degree of aversive, that's something you want to keep at an absolute minimum. While the use of any "punishment" (the technical term for teaching "not") at all, ever, is controversial, it's pretty much universally acknowledged that using reward to build desired behavior is highly successful with birds.
Your best bet is probably to train them to do something else instead. For example, get a really cool playgym/tree with lots of interesting stuff and rotating toys and foraging opportunities. In addition, make a habit of reinforcing them for staying there. If you are working on your laptop and your bird is peacefully playing on his or her tree, tell him he is good and give him a treat! You can also train the bird to come to you on command, so if you see the bird chewing on a cord across the room you can recall it to you.
If a wing trim is something you'd consider, it may make it easier since it is harder for the bird to get as much distance from where he or she has been placed. You still need to reinforce them for amusing themselves, but the situation isn't a delicate. However, the common sentiment on this forum is for flight, so I'll be far in the minority and probably demoted to finch for saying so!
