Avoid over mixing the batter, ensure accurate measurements, and don't open the oven door too soon. Sinking can also be caused by underbaking (a toothpick inserted in the center should comes out clean).