Shaving Problems

Yesterday I shaved and used a different shaving cream than I usually do. I’m used to getting a few red bumps afterwards but never this bad. Does anyone know if the new cream could be why I have so many bumps and ingrown hairs? Also, if anyone has any tips for treating and preventing these please share!!