I get a lot of ingrown hair after I get my legs waxed? What is causing this? How can I prevent it from happening again? I am a 20 year old female

When you wax.... ..You are essentially pulling the hairs out by their roots. When the hair grows back, the shafts have to find their way to the skin surface and the ones that can't become ingrown hairs. The solution is to shave, rather than wax. You'll have to do it more often, but you won't get nearly as many ingrown hairs. Laser hair removal will eliminate the hairs permanently, but that's more expensive.
Waxing. The goal in waxing is to remove the entire hair from the follicle, but often it breaks either above or below the skin's surface. So now instead of a new hair forming and growing back having a beveled edge, it's now blunt and sharp causing ingrown hairs.