To get a nerd in high school, try being friendly and respectful. Offer to help them with schoolwork or projects they're working on. And, make an effort to listen attentively when they talk about their nerdy passions.
Well, one way could be to join the same clubs or activities they're involved in. That gives you a natural opportunity to interact and build a connection. Also, don't be afraid to approach them with intelligent conversations or questions related to their interests.