If your branches are small enough to fit in your oven, many ppl slow bake them for about an hour (low temp.- about 200*) to kill off insects in them. When I've done
that, I also dampened the wood first, to help keep it from being flammable or scorching. Obviously you want to keep an eye on things if you try this. Most of my
branches are way too big to fit my oven though...that's why I sometimes have a wood-boring beetle tunneling thru a branch.
There are so many kinds of insects in the world, & different areas have a different selection...you'd do better to identify it if you asked a local entomologist or maybe
a pest control company (-though you have to hope they're honest & won't pretend you need fumigated for something harmless, lol).