Razor bumps how to prevent them?

The only way to completely prevent razor bumps would be not to shave.

If you do shave then avoid shaving too often, this increases irritation and skin damage that leads to razor rash. When you shave be sure to use a clean shapr razor - you may find some brands work better than others, Gillete also make pro-sensitive razors with multiple blades to prevent excess pressure when shaving which make make razor rash worse. When shaving go with the grain of the hair rather than against it and always shave wet when using manual razors. Using good lubricant to help the razor glide over the skin easier is important too, rather than shaving foam or gel try oils or hair conditioner which tend to be slippier so work better to reduce friction.

Before shaving always exfoliate with exfoliating gloves or a body scrub to help get rid of old skin and help prevent ingrown hairs, and after shaving use a good lotion.