Shaving increases you risk of having cuts/open wounds, which does slightly increase your risk of getting an STI. But waxing could do that too. All you can do is accept that sex will never be 100% risk free and try and be sensible and use barrier contraception to reduced your risk. Literally nothing in life is risk free, you know?