Razor burn/ rash near pubic area

I usually shave my pubic area and every summer I get these rashes which are painful and really embarrassing when I wear a bathing suit. Worst part is when I wear a bathing suit or shorts my public hair from both legs rub against each other when I walk, creating a worst rash. I’ve been considering waxing instead of shaving. Has anyone else experienced this and found ways to stop it or help it?!