Not resting macarons enough or baking at the wrong temperature is most likely the cause. Make sure the tops don’t stick to your finger before baking them. Then, use an oven thermometer to ensure precise temperature! Finally, make sure to tap the trays before resting the shells to get rid of the trapped air pockets.