If you shave your private area then you might get razor burn and sweat irritated it but if not then go to your doctor. If it bothers you or is fairly large then go to the doctors asap if not try waiting a couple days to see if it goes away.
Happens to me every time I buy and wear new jeans. Unless I wash them 4 times before wearing. And sometimes when I buy the wrong washing agents.