Cystic acne

I bought this new foundation and it’s the first time I’ve got cystic acne from one. Is there anyway to prevent it?!!! I love the foundation I’m just devastated. And how can I get rid of the cystic acne too?!!