Baking requires precision; it's one of those cooking tasks where just throwing in a rough quantity rarely works. If you're attempting a new baked treat, weigh the flour and other dry ingredients rather than simply relying on cup measures.
Picture by advencap
Stephanie Alexander makes the point well in her legendary guide The Cook's Companion
I always weigh flour when baking as, depending on how one taps or tamps down the measuring cup, the quantity can vary considerably.
You can extend the principle to finding recipes too; given the choice, one with weights rather than cups is more likely to give you the right results. That won't always be the case when cooking -- it's far less likely to be an issue with a casserole -- but for baking it's a solid principle.