If your ricotta cookies came out flat, chances are you didn't chill the dough long enough. When this happens, the ricotta dough will spread out and flatten as they bake.  To avoid this, chill the dough for at least 2 hours before baking them. Also, try not to leave them sitting on the counter at room temperature for too long, as the dough will warm up and flatten that way too.