I think this is Thirteenth Child (2009) by Patricia Wrede, the first book in the Frontier Magic series.
From Goodreads:
Eff was born a thirteenth child. Her twin brother, Lan, is the seventh son of a seventh son. This means he's supposed to possess amazing talent -- and she's supposed to bring only bad things to her family and her town. Undeterred, her family moves to the frontier, where her father will be a professor of magic at a school perilously close to the magical divide that separates settlers from the beasts of the wild.
More precisely...
She got a necklace that [...] was covered in layer after layer of spell. She saw this while contemplating the strange object.
In the 26th chapter, while doing a concentration exercise mixed with a "feel your surroundings"-like technique, Eff perceives the spells around her, but the one on her wooden pendant is different from the others, so she just tries to let it come "as is" and realises it's indeed a layer of spells. The pendant was given to her by Wash Morris, a circuit rider and one of her mentors.
All of a sudden, the spell on the charm came clear, just for an instant. It wasn't one spell; it was a gathering of spells all layered together. Some of them felt like Aphrikan magic, some like Avrupan magic, and some like nothing I'd ever seen or felt before. All of them worked together, hiding and absorbing and using and feeding and changing the magic that fed through it.
She solved this epidemic by finding the the little strand of magic in every beetle and twisting it, causing wave after wave of beetles to transform, and killing them.
That happens in the 29th and 30th chapters, where Eff reaches out for the mirror bugs and twists them so that the beetles can absorb magic from them.
I could see the way the beetles pulled at the magic all around them, even the magic of the mirror bugs. And I could see the little twist in the magic of the mirror bugs that kept the beetles from taking it along with all the other magic. It was a lot like the slippery twist in the magic of the charm Wash had given me, only not so old or complicated.
I stared into the cloud of mirror bugs, trying to hold on to everything I was sensing. If there was a way to include that twist in the settlement spells, the twist that kept the beetles from absorbing the mirror bugs' magic, then maybe the beetles wouldn't be able to absorb magic from the settlement spells, either. [...]
But I could get at the mirror bugs.
I smiled, and reached out. [...]
Mirror bugs dropped out of the sky like silver rain. New mirror bugs rained upward as the crawling beetles popped and took off, then fell in turn as the beetles farther out absorbed their magic. It didn't take long for the cycle to spread outward from the settlement in an expanding ring. All I had to do was keep holding that little twist straight, so that the beetles could absorb magic from the mirror bugs.
Early in the book some of the brothers were making puns, one of the puns was about a lion.
The sixth chapter includes the following puns:
“Hey, William, cat got your tongue?”
“Maybe he’s horse.”
“If you’re sick, maybe you should try lion down.”
“He can’t be feeling that bad; he’s not dragon around.”
“That sounds more like ewe.”
“Oh, that pun really sphinx.”
There were different types of magic, but they were named strangely. Like America, and Africa, but spelled differently.
The three types of magic are Aphrikan, Avrupan and Hijero–Cathayan.
Found with the Google query book seventh daughter seventh son
which yields this solved story-id Goodreads thread.