That's probably not herpes. It could be balanitis.
https://www.healthline.com/health/balanitis
If it's not the head of your penis that is dry and cracked, it might be a fungal infection like yeast, an allergic reaction to something, drying skin from certain soaps, eczema, or a bunch of other things -
https://www.healthline.com/health/mens-health/dry-skin-on-penis
You should let your doctor check it out. It's really unlikely to be an STD.