In a medium bowl, sift together flour, salt, and baking powder if using. Set aside.
In a mixer bowl fitted with the paddle attachment, beat butter and sugar on medium-low speed for 1 minute (for cookies that hold their shape the best), or 3-4 minutes (for light and fluffy cookies that will still hold their shape but not as well). Beat in egg and vanilla extract just until combined. Reduce speed to low. Add flour mixture and beat just until combined. Do not overmix or the cookies will be tough.
Form dough into a ball, then flatten slightly to form a disc. Wrap with plastic wrap and refrigerate for 1-2 hours, until firm enough to roll.
If you don’t want to use the dough right away, you can refrigerate it or for up to 3 days or freeze it for up to a month, then thaw it overnight in the fridge.
Take the dough out of the fridge and let it sit on the counter for a few minutes to soften slightly for easy rolling. On a lightly floured surface (or between 2 pieces of parchment paper), roll the dough to a 1/4-inch thickness. Cut out shapes using a cookie cutter and place them on baking sheets lined with parchment paper.
If at any point the dough becomes too warm, place it back into the fridge for a few minutes. Re-roll the remaining scraps and repeat. Place sheets with cookies in the freezer or fridge for at least 15 minutes, until firm, so that they will be less prone to spreading.
Preheat oven to 350F/180C. Bake cookies for 8-12 minutes, or until cookies appear golden brown at the edges. Baking time will vary and may take longer depending on the size of the cookies. Allow cookies to cool in the pan for 10 minutes, then gently transfer to a wire rack to cool completely.
Store cookies at room temperature in an airtight container for up to a week or freeze for up to 2 months. To thaw, leave on the counter, still covered, or overnight in the fridge.