"Wax" here is a verb that means "to grow" or "to swell". A waxing moon is one that is growing fuller. A waxing anger is one that is getting stronger. Here's WR's definition for "wax". Look under the listing for "verb" and you can see what the dictionary has to say about the word.
Saying that this wrath "waxed like a hatful of moons" is a way to say that it got much stronger or more intense. That is figurative language that compares the growth of anger to the waxing moon.
Welcome to the forum, Duizihu! I agree with Owlman. I just want to add that "a hatful of moons" is not a known expression, and I've never heard it before, but both Owlman and I understood what is meant. The "hatful" serves to multiply the waxing (growing). One imagines a rather large hat. A different "container" could have been used and it would have meant the same thing—a bowlful of moons, a bucketful of moons, a wagonful of moons . . .