Thanks for posting your query at DoctorSpring.com
I can understand your concern.
These are indeed razor bumps. They are caused due to shaving. There are bacteria called staphylococcus which might enter the small abrasions caused by shaving and cause this infection known as folliculitis.
I would recommend application of mupirocin cream or neosporin cream twice a day on the affected areas.
This will help to resolve the rash.
Please let me know if you have any queries.