I learned to use paper first aid tape to hold my foreskin open while the dry spray miconazole killed the yeast.
Paper only; the regular vinyl tape is too sticky. Rinse it off with soapy water when done.
Try not to get tape on the membrane side of the foreskin.
Leave your exposed penis outside your underwear while treating it. May have to park your scrotum out there, too.
The important part is keeping the surfaces dry throughout the treatment.
I threw out my old underwear in case it was re-infecting me. Might not have to do that.
It can take time to get rid of the yeast.