I see this sentence in Harry Potter. My understanding is that 'how' here works as an adverb and very is an adverb too. So, I am not sure if it is correct to put them together here. For example, how silly you are. Can we say how very silly you are?
How very silly you are! is an exclamatory sentence that is exclamatory in form. This simply means that the sentence starts with What or How, and the object of the sentence is placed before the subject and main verb. And, of course, an exclamation point is used.
A few examples:
You have pretty eyes. => What pretty eyes you have!
She is beautiful. => How beautiful she is!
It is droll. => How droll!
There is an excellent explanation of exclamatory sentences here: https://www.english-grammar-revolution.com/exclamatory-sentence.html