This is an issue for many men, and it can be problem when you want or need to use condoms. There are a few things you can try.
You can start by trying to link condom use with pleasure.
One way to do this is by masturbating with a condom on when you are alone. You can also try masturbating until you are close to ejaculation, and then putting a condom on.
Sometimes it helps to have a partner put on the condom while you continue to do things that arouse you like kissing and touching.
Try a few types of condoms. Sometimes the fit makes a difference. If the condom is too tight it can be uncomfortable, and cause you to lose an erection.
Some men find that the female condom works for them.
Please leave a comment to let us know if this answers your question or if you need more info.