I was using an eletric razor to shave  my scrotum and it cut my skin? Not bleeding but worried about infection risk

Infection. Clean often with soap and water and you should be fine.
Observe. Unlikely to be a problem, but if you develop symptoms of pain, redness, warm to touch skin or drainage, best to see md. Otherwise, continue with daily bathing using soap and water.
Superfast healing. The good news is that area has fantastic blood supply and so healing will occur rapidly. Inflammation (red, hot, tender swelling) is the body increasing the blood flow to the injury to bring healing factors to the area and also the veins expand to carry bad stuff away. Dressings and ointments are of no value there. Avoid further trauma to the area and let nature take it's course.