Well, it could be that the Queen has a special connection to the wizarding world in this fanfiction. Perhaps she has been secretly informed of Harry's bravery and selflessness all along. And as a symbol of the British monarchy, she knights him to show that the Muggle and wizarding worlds can have a positive relationship. So, she bestows this honor on Harry.
Maybe Dumbledore, if he were still alive in the fanfiction. Dumbledore was highly respected and had a great influence. Knighting Harry would be a way for him to publicly recognize Harry's achievements and heroism on a grand scale.
In the 'Harry Potter gets knighted' fanfiction, perhaps Harry is honored for his heroic deeds against Voldemort. He might be knighted in a grand ceremony at Hogwarts, with all his friends and professors present. The Ministry of Magic could finally recognize his great contributions to the wizarding world.
You can try fanfiction websites such as Archive of Our Own (AO3). It has a vast collection of 'Harry Potter' fanfics, and there's a good chance you'll find some related to Harry being knighted there. Just use the search function and type in relevant keywords like 'Harry Potter' and 'knighted'.
There might be a 'Harry Potter knighted fanfic' where Harry is knighted by the Ministry of Magic in a special ceremony. In this story, the author could explore how his friends react to his new honor. Hermione might be proud yet also worried about how this new status could change Harry. Ron, on the other hand, would probably be in awe and full of jokes about his 'knighted mate'.
In this fanfiction, Harry Potter would interact with the Queen in a very unique way. Since he is used to the hierarchical system in Hogwarts, he would understand the importance of showing deference to the Queen. He could offer her a magical gift, like a charm that gives good luck. And the Queen, being curious, might ask him about his world. Harry would have to be careful not to reveal too much about the wizarding world to the muggles, but still satisfy her curiosity. There could be some misunderstandings too, for example, when Harry tries to explain some magic concepts using wizarding terms that the Queen doesn't understand.
It could be an original character created specifically for the fanfiction. A young and beautiful queen of a small, yet prosperous kingdom, who has a strong will and a love for her people. She might be open - minded and curious about the wizarding world, which makes her a perfect match for Harry.
It might be an ancient magical being that has the form of a queen. She could have ties to the very origins of magic in the Harry Potter universe and decides to save Harry because she foresees his importance in the future of magic. For example, she could be a guardian of some sort of magic that is crucial for Harry to defeat Voldemort in the long run.
It could be the Queen of England, as in the real - world monarchy. In the fanfiction, she might be a figure with hidden knowledge of the wizarding world and decides to use her power to rescue Harry.