Flat ricotta cookies can be a result of a few factors. One common reason is over-mixing the dough, which can lead to excess gluten development, resulting in a denser and flatter cookie. Another factor could be an issue with leavening agents like baking powder or baking soda, which may have expired or improperly measured. Additionally, if the dough is too warm when placed in the oven, it can cause excessive spreading. To prevent flat cookies, avoid over-mixing the dough, check the freshness of leavening agents, and chill the dough before baking.