It's pretty unusual for a company to only consider people who've explicitly said they want a role when they're filling that role. What I mean is, when you have so many developers that you need another lead, or when your lead leaves and needs to be replaced, you typically look at all the developers and ask yourself "which of these is ready to be a lead?"
If someone who's ready to be a lead has told a manager they don't want to be (because leads work longer hours, or travel more, or go to more meetings, or whatever) then the manager probably won't promote them. But if someone who's ready to be a lead has never mentioned that they actively want to be one, it's not normal for managers to rule them out of consideration. In other words, the fact you never said you wanted to be a lead is not why you weren't made the lead.
That said, you should still tell your manager you want to be a lead, and now is a great time to do it, because your manager should still have a reasonably fresh cache of the information that went into deciding where you were on your path to becoming a lead. (In fact, you might be ready already, but there was only one lead job available, and they just happened to choose the other person.) So going and saying that you want to be a lead is a good idea. A better idea is finding out what you need to do to become a lead. A very poor idea is conveying your disappointment that you weren't made lead, especially if you phrase it as being disappointed you weren't considered, which implies that anyone who considered you would choose you.
Here are some good questions to ask.
I see X was promoted to team lead. That's got me thinking: how often does a team lead position open up? I know people may leave, but just roughly is there likely to be another opening within a year, or is it typically something longer?
I think I understand what a team lead does. Do you think I need more experience or training before I'm ready for that role? What should I focus on?
Is team lead generally the "next step" up for developers here, or is there another path (architect, advisor, ...) that is more technical and less managerial? OR something more managerial and less technical?
Unless it's your performance review I wouldn't try to connect the dots and ask something like "so, do you think I might be team lead within a year?" That puts too much pressure on the manager. But do continue the conversation until you understand whether you're ready now, if not what you need to learn or show, and so on. You should have a rough understanding of whether you still have a lot of dues to pay, or can consider yourself to be on track towards that promotion in the near future.
I wouldn't have as a goal for this meeting that your boss understand you would have preferred the promotion go to you. I don't see any benefit of your boss learning that. Either the boss will feel bad for passing you over (if you're right that you should have had it) or the boss will feel irritated and criticized (if you're wrong.) Neither of those is good for you. Focus on what you need to work on to be first in line for the next opportunity. And then work on that!