Beat the butter alone for 1 minute until smooth but not fluffy. The butter should be softened but still cool—approximately 65°F is ideal.
Add powdered sugar to the butter and mix at medium-low speed for 2 minutes until just combined. Avoid overbeating as this can make cookies tough rather than tender.
Gradually add flour and salt, mixing on low speed just until the dough comes together. If using vanilla, add it with the dry ingredients. The dough should look somewhat crumbly but hold together when pressed.
Form the dough into a disk (for cut-out cookies) or press directly into a 9-inch tart pan with removable bottom (for traditional wedges). Chill the dough for at least 30 minutes.
Preheat oven to 325°F (165°C). For cut-out cookies, roll the chilled dough to ¼-inch thickness on a lightly floured surface and cut into desired shapes. For the tart pan method, prick the chilled dough all over with a fork in a decorative pattern.
Bake until the edges are just turning golden but the centers still look pale, about 15-18 minutes. Remember that shortbread continues to firm up as it cools.
Cool completely in the pan or on the baking sheet for 10 minutes, then transfer to a wire rack to cool completely for at least 20 more minutes before serving.