Hello,
I am assuming you are talking about a eruption on your penis.
Firstly, it's not a rash. With a rash you will have itching and burning sensation. And there would be more eruptions. This is very normal, and nothing to be worried about. But, keep a check on it. If it increases in size or if there is change in color of the eruption then you need to consult a doctor immediately. A surgeon or physician will do. There are few things you can follow to prevent any infection, firstly keeping the area clean always. And make sure you left your glans and keep your frenulum area as well clean.
If having sex try always wearing condom to prevent from attracting any kind of STDs.
Thank you.