On the surface this looks like a simple project: spray the hole, plug it, done. The result is reliably failure for the same reason every spring. Plugging an active hole traps the female and brood inside, and the survivors chew a fresh exit through the surrounding wood. Now you have your original hole plus one or two new ones a few inches away. The cycle continues and the gallery network expands rather than collapses.
The correct sequence is treat first, plug second, paint or varnish third. DIY products at the hardware store often don't penetrate the four- to six-inch gallery deeply enough to reach the brood, especially on multi-year tunnels that have branched off in different directions. Insecticidal dust applied with a proper duster reaches the cells; surface spray on the hole opening doesn't. Many homeowners who treat and plug three or four holes in spring find the same number of fresh holes by fall because the brood inside survived the surface spray and emerged on schedule.
There's also a benefit side to this story worth knowing. Carpenter bees are real pollinators, and the males that hover and dart at you in spring cannot sting (they have no stinger). Females can sting but almost never do. So the goal isn't extermination, it's protecting the wood structure from a few specific bees making galleries in the wrong place. A pro with a proper duster reaches the gallery, plugs the holes after the dust has worked, and explains the wood-protection step homeowners almost universally skip: paint or varnish the affected wood. Carpenter bees rarely attack finished surfaces, which is why a structurally identical eave that's painted gets ignored while the unpainted one gets drilled every year.
Multi-year galleries are where DIY really breaks down. A single visible hole can lead to a branched network of four to six offshoot tunnels through structural wood, each with its own brood. Treating only the visible hole leaves the network intact. Add woodpecker damage on top, birds tearing open the wood to eat the larvae, and you're looking at trim or fascia that needs to be replaced rather than patched. A pro maps the network, treats every branch, and coordinates the wood repair scope. Initial service runs $250 to $600. Coordinated wood repair, when needed, runs $400 to $1,500.