Ah, I’ve been there! It’s usually because the cupcakes were underbaked or the oven temperature was slightly off. Make sure they bake long enough; you can use an oven thermometer to double-check your oven’s accuracy.