Harry is her best friend. She said so in the books. Hermione likes Ron, but before Deathly Hallows, Ron wasn't that nice to her. Sure, he defended her from Draco or Snape but he also teased her, made fun of her…
Why is Ron a good friend to Harry?
In the book, Ron becomes friends with Harry by telling him his insecurities and leaving him vulnerable to Harry. Harry can relate to Ron's troubles (such as having hand-me-down stuff, being the least loved in the family, and not getting many of his own stuff) and Harry leaves himself vulnerable to.
Was Harry better friends with Hermione or Ron?
In the earlier books it's definitely a no brainer: Ron is Harry's first and absolutely best friend. He even opens up his home to him. Hermione is also a very good friend to him even then but Harry was not as close to her as he was to Ron.