Context: I got it in my head that I really REALLY wanted a doorbell. I have light switches by my frontdoor (shown in image), and a porch light directly opposite them. Because of the placement of the porch light relative to the light switch, and some tapping on the wall, I could tell that the space above the switch was hollow, and I assumed that my electric lines passed through that way. I have a doorbell transformer that I need to install - I figured I would open up a space to the left of the switches for a box where I would install the transformer. Well, I started cutting out the drywall when I discovered that nope - that's where my electric lines are (I damaged the jacketing on the cables, but I should be able to fix that with some shrinkwrap heatshrink jacketing, I think). So I broke open the hollow space, found that once upon a time, there were electric lines there, but they've long since been cut. So, at the least I now know where I will install the transformer, and should otherwise be able to get this doorbell installed.
My question: After I've finished the install, I don't know how to close up these holes I've made - or more specifically, I'm not sure what product is right for the job? I imagine some sort of plaster? Or mortar?
Those wires look pretty badly damaged honestly I wouldn't feel comfortable putting them back in the wall like that. Electrical fires happen when you have current flowing through conductors that are too small to accommodate it, and if you nicked the copper you could be creating just such a situation.
If there's slack in the wires, there often is, you can try just pulling the damaged wires through and redoing your switches (watch videos on how to do this, it's not hard but fucking up the wires with pliers or something is a good way to burn down your house). If there's no slack then you could put in a junction box and cut out the bad sections, reconnect them with wire nuts and close the whole thing up with a blank plate. You have the hole there anyway. If you decide to do this safely you'll need some way to verify absence. I like non-contact voltage testers for this and they're not too expensive.
If all of this seems daunting you could also just call an electrician. A few hundred bucks stings but it's better than burning down your house. My 2c
This is correct op. Be dang sure the wires okay. You could move the switch box up. And reroute the wires to remove the damaged bits.