Even Ian, as he begins, is not the typical guy you would associate with a girl like Lena. But unlike Stan, he already has the potential to bridge the gap between them, because he's working out at the gym (which is building his body confidence), socialising with his friends (some of whom are pretty outgoing and push Ian to go further on the social scene) and his determination to succeed as a writer, gives him a belief in himself, that Stan just totally lacks.
Stan could do all those things himself. He could lose weight and work out in the gym, to get a better body. He could buy more fashionable clothes, work on developing his social skills and building his confidence in general. But until Lena, pushes hard for him to do that, he just sits behind his computer screen, saying 'poor me' and how the world never gives him a fair shot. If you make the effort, there's usually someone out there for you. But if you don't, then most of the time unsurprisingly, there's nobody.
But it also requires you to have realistic expectations of who you could end up with. Because he spends most of his life in front of a computer screen, Stan fantasises that he could get the hot girl, and because she's not horrible to him, begins to believe that maybe she wants him too. Poor social skills, mean you often misinterpret people being nice to you, as evidence they like you in other ways. And occasionally maybe they do. But most of the time, they're just being nice to you. But you don't see that, because you're desperate for them to fancy you, as much as you 'think' you fancy them. And because you devote so much attention to pursuing a girl who'll never want you that way, you miss the one who would, if only you were paying attention elsewhere.
Holly is the obvious girlfriend for Stan. If he put as much effort into pursuing her, as he wastes in a forlorn effort to land Lena, he'd end up with a cute girlfriend, who just happens to have a hot future as a writer. Both of them are nerds, so they have tons in common. And unlike Lena, he'll never have to worry about what she might be getting up to, on those nude modelling shoots?