Build up first flirting excitement with the man you like.
If you directly walk to him and ask him out, it's like going from ground zero to a 5'000 m mountain top. All at once, it can be thrilling! that's great and soon you might be so confident that you'll just do it.
If it's just too much to take this step, build up complicity and take smaller steps. Smile, be fun to be with, exchange meaningful eye contact with him. This will give him a taste of what you have to offer.
Your life is not being played there on the spot! This is an experience. It is one opportunity. You'll get many more. A "Yes!" would be great but you want to have a "rejection" strategy in case the answer is not what you expected.
No fear! You go there to win! Now, winning is emotionally winning. No one can disturb your confidence!
A guy will go for it if he already got a taste of what you have to offer. If he sees you as a fun-free person, he'll respond to your presence for sure.
The confidence boost comes from being used to these type of situations. You get used to the flirting game by being part of it and experimenting with it. Once you are familiar with it, asking a guy out becomes very natural. This skill is already you.
Asking him out is like scoring in the dating game! To score, you need to be in the game, engaged, familiar with the moves. You can't score if you watch from the side of the pool. Jump in the water and play the game!
Lower your expectations and take risks.
There are many moments you can score. There are many right moves. You want to hit the target! Trust your instincts! They are your greatest ally. Be flexible, ready to move. Be alert and awake!