Three short questions, and you will see what best fits what you see and feel, and what you can do yourself. This is not a diagnosis; only your doctor can make one.
1. What do you see or feel most?
2. How long have you had it?
3. Do any of these apply? Tick whatever is true.
First choose under question 1 what you see or feel most.
Call your doctor
If you cannot pass urine, call your doctor or the out-of-hours doctor service straight away. If your foreskin is stuck behind the glans and everything is swelling, cool it immediately with a cold wet cloth or a bag of ice wrapped in a cloth. If you then still cannot slide the foreskin back, call your doctor or the out-of-hours doctor service straight away. If you have a fever or feel unwell, call your doctor for an appointment; if passing urine also hurts, call straight away.
Most likely irritation or an early inflammation
For the first three days, rinse your glans three or four times a day with lukewarm water, without soap or shower gel, pat it dry and then slide the foreskin back again. Stop using anything new that has come into contact with it recently (what helps).
Most likely a yeast infection
Small red spots, or white patches with a red edge and flaking, point to a yeast infection. Start by rinsing and patting dry. If that has not helped after a few days, an antifungal cream may help; discuss with your doctor whether it is right for you. While you use such a cream, a condom offers less reliable protection (about the cream).
Have your doctor take a look
Yellowish-white fluid or pus from your penis or under the foreskin, especially with an unpleasant smell, is a reason to make an appointment. It may be caused by bacteria, and an antibiotic cream from your doctor helps against that. If it comes from the urethra, or if there is a chance of an STI, get tested as well.
Have it checked first
A small sore, blister or open spot can be part of an inflammation, but also of an STI such as herpes. Do not put anything on it yourself, but have your doctor take a look. Do not have sex until your doctor has examined it, not even with a condom. After a new partner or sex without a condom, an STI test is part of it too.
Have your doctor examine it
Pale, sometimes shiny patches on the glans, or a foreskin that is becoming tighter, can point to the skin condition lichen sclerosus. That needs a different treatment from a yeast infection. So have it examined; if necessary, your doctor will refer you to a dermatologist (lichen sclerosus in men).
Not clear yet
If you are unsure what it is, rinse with lukewarm water only and pat thoroughly dry. If that does not make it better, your doctor will find out what it is.
More than two weeks
If the itching or the spots have not eased after two weeks, or if it is getting worse, make an appointment with your doctor. Your doctor can take a little discharge with a cotton swab and have it tested.
It keeps coming back
If it keeps coming back, discuss with your doctor what might be causing it. Your doctor can look at your blood sugar, your foreskin and possible skin conditions, and arrange a culture if needed (if it keeps coming back).
Passing urine hurts
Pain or a burning feeling when passing urine is a reason to make an appointment with your doctor. If you also develop a fever, or feel unwell, call your doctor or the out-of-hours doctor service straight away.
Diabetes or a diabetes tablet
With diabetes, a yeast infection gets a chance more easily. Diabetes tablets such as Forxiga and Jardiance make you pass sugar in your urine, and that helps yeast grow faster, also in men who take such a tablet for their heart or kidneys. Do not stop taking it on your own, but tell your doctor (diabetes and diabetes tablets).
After antibiotics or prednisone
After a course of antibiotics or prednisone, yeast gets the chance to grow more than usual. Rinse with water and pat dry; if that does not help, discuss with your doctor whether an antifungal cream is right for you.
Used something new?
If it started after using a new condom, lubricant, soap or gel, stop using it; replace a condom with a different type. The glans can react to latex, fragrance or a warming or numbing ingredient (what comes into contact with your glans). If you suspect the condom, have a look at latex allergy and condoms.
Your partner also has symptoms
If your partner has a yeast infection, or has itching or an inflamed glans themselves, they should get treatment too. Without symptoms your partner does not need to do anything, except in the case of an STI: then they should get tested as well (and your partner?).
Get tested for an STI
After a new partner, or sex without a condom with someone who has not been tested, an STI test is part of it, at your doctor or the public health service (the GGD in the Netherlands). Until you know the result: no sex, or use a condom; if you have a small sore or blister, not even with a condom (recognising and testing for STIs).
Not going away?
If it has not eased after a few days, ask your doctor for advice. Make an appointment if the itching or the spots have not eased after two weeks, if it gets worse or if it comes back (when to see your doctor).