Go through these in order and stop at the first one that applies. If you are reading this for someone else, answer for them.
Seek emergency care if:
Seek prompt medical assessment for a new sore, blister, lump, bleeding area, urethral discharge, or symptoms following a possible sexual exposure.
A sexual health clinic can provide confidential testing and treatment.
Contact a healthcare professional urgently if there is fever with worsening redness or swelling, pus, increasing pain, or difficulty passing urine.
A child with penile inflammation and fever or urinary difficulty should receive urgent assessment.
Arrange routine follow-up if symptoms do not improve with the recommended treatment, return after treatment, or repeatedly affect the same area.
Follow-up is also appropriate if the foreskin becomes progressively tighter or if treatment causes burning, rash, or another unexpected reaction.
The article also says
A naturally nonretractable foreskin in a child is not an emergency if the child is comfortable and urinating normally.
Every sign above is quoted from the sofidex article on Balanitis. If you are not sure, err upward — it is always reasonable to be checked.