I had so much trouble with shaving...ingrown hairs, razor bumps, everything. I finally got a system that works and lets me shave regularly without having any major problems. I haven't gotten any bumps on my legs since I started this. Basically my routine is:
1) Exfoliate in the tub before showering. I make a sugar scrub out of approx. 1/3 c coconut oil and 2/3 sugar, but you can substitute any oil you want. Just melt the oil (if needed) and stir in sugar until it's completely saturated. Add a few drops of vanilla if you like, though I really just like the smell of coconut oil already

Store in an airtight container (I use a small mason jar), and top it off when it starts running out. Rub like crazy into your skin, but keep in mind that you can overdo it and start to rub skin raw. Super cheap and makes a huge difference. Rubbing it in only takes a minute, especially if you just do your legs, and your skin feels super amazing afterwards.
2) Shower as usual, making sure to get all the sugar off. Avoid super hot water, but let warm water / steam get the skin that's going to be shaved be nice and relaxed.
3) Shave. Get a good multiblade razor with a pivoting head -- don't really need to worry about nicks with these. I shave with straight coconut oil (Can't get enough of the stuff!) but a good shaving cream/gel works too. Hold the razor loosely by the tip and smoothly slide it across. Avoid making multiple passes over the same area or putting much pressure at all on it. Keep your razor sharp -- replace the blade once you feel it start dragging. Experiment with going with / against the grain. I find against the grain works best for my legs.
4) Use TendSkin. This stuff is
amazing! There are alternative products and homebrew versions, but I've not tried them. I'll probably experiment a bit more someday. It's a little pricey, but lasts a while, too. Burns somewhat, but it is alcohol based so that's to be expected.
https://www.amazon.com/Tend-Skin-Solution-Unsightly-Ingrown/dp/B001ECQ7G4?th=1My razor bumps and ingrown hairs
literally stopped once I started using this stuff.
5) Let the TendSkin dry and then moisturize. I have a big tub of St. Ives moisturizing face cream, but I use it all over. The alcohol in the TendSkin will dry your skin out, so you want to be sure to protect your skin with this afterwards.
6) Optional -- If it's a really dry day or my legs are feeling extra dry, I apply some coconut oil after the moisturizer has soaked in. This seems to help hold the moisture in. Baby oil works too, but smells funny to me.
YMMV, but I was having a lot of trouble with my legs and this finally let me get good results. The tendskin really made an impression on me, I'll recommend it to anyone having issues with razor bumps. This routine keeps the skin really healthy and moisturized, too