So, are you sure it is yeast and not balanitis? If you try OTC yeast treatment, you buy the same one marketed for women. Antifungals called azoles. Monistat and Lotrimin are two popular ones. (however, when using these if they are oil based, do not rely on condoms). You apply the medication directly to the penis rubbing it in twice a day generally. You can try tree tea oil or coconut oil also. OR you can go to your doctor and get the medication that clears it up systemically. Keep your penis dry. If it doesn't clear up, consider that you may have balantitis.
Here is a post from a doctor here if it doesn't clear up: https://
www.medhelp.org/posts/Dermatology/yeast-infection-on-my-penis-and-it-wont-go-away/show/1273852