Ask this question after becoming a medical student.
The answer is simple, however. Do research. Do well on step 1 and 2 CK. Try to go to a school with a neurosurgery department. Finds attending and resident mentors. Get GOOD LORs, LORs and who you know are massive in neurosurgery due to the extremely small community.
But really, I wouldn't worry about this until starting school. Only 1/4 of the people in my class who initially were gung-ho about neurosurgery are going to be applying as fourth years. Many people don't realize how absolutely grueling the residency is and it is also not a cush lifestyle post-residency. Many people self-select out due how difficult the training is, the reality is you might too.