Wow, this could be tough to answer, there could be so many different things causing it. It could be anything from the type of soap you’re using to a fungal infection, allergic reaction to material (underwear), type of lube used during masturbation, or other issues. I assume since you’re uncircumcised, you prbly don’t use lube, so that would rule that out. Obviously uncircumcised males need to be careful to pull the foreskin back & clean thoroughly, but of course you’d need to use some type of very mild, non-allergenic soap to avoid irritation.
If you’re involved in a lot of athletic activities, the sweat could get trapped & cause a fungal infection. Also overly vigorous masturbation could cause some irritation, but again, for guys who still have a foreskin, that’s not usually the case.
I know this is all just speculation & I may not be helping you much, so I think the best thing would be to just see your reg Dr 1st, see what he/she has to say, then if that doesn’t help, you may need to see a dermatologist and possibly a Urologist. Hopefully your reg Dr can help with this.
I understand that at your age, it can be a little embarrassing to talk to a Doc about this stuff, but please be assured, they will NOT be embarrassed or uncomfortable w/ this kind of question, and in fact, they’ve dealt with much worse & more embarrassing things & there’s a good chance they will have seen this kind of thing before.
So please, don’t be embarrassed, just see your Dr. Hope you find a cure & please check back here & let us know what you found out & if you’re cured - it will help all of us (both readers & answers) to learn smthg & be able to give better advice in the future ...