Nagini is a horcrux and can't be killed with a wand! The only reason the Sword of Gryffindor works is because it absorbed the traits of basilisk venom. Basilisk venom is one of the only things that can destroy a horcrux!
But from that moment on, Hermione Granger became their friend. There are some things you can't share without ending up liking each other, and knocking out a twelve-foot mountain troll is one of them. Where the friendship began.