No, you didn't screw it up, he was just your crush, and it seems, you aren't his. This happens, just the way life is sometimes. Nothing you can do about it. If he liked you, he'd have stayed and talked to you. As he didn't, and didn't give you some excuse about having some place he had to be, then, it's likely, you just weren't his type.
But pat yourself on the back, you got up the courage to go up to your crush and introduce yourself, that takes spunk. So it didn't work out this time, but next time it may. Just don't let one loss, put you off. Sooner or later, you will find another boy to crush on and hopefully, he'll feel the same way about you.