Why was Harry Potter the chosen one from harry potter half blood prince?

Harry Potter is the chosen one in the Half Blood Prince because of the prophecy that Trelawny had given Dumbledore when The First War was going on. Snape was listening outside the door and heard part of it. He told Voldemort the bit he heard and Voldemort hunted down the Potter family, killing Lily and James and "killing" himself, when the curse rebounded off Harry. In the prophecy, it mentioned a boy that was born at the end of July and how one shall die at the hand of the other. That neither could live while the other survived.

Harry was born on July 31st and basically either Harry had to kill Voldemort or Voldemort had to kill Harry.