Prepare the dry ingredients: In a medium bowl, whisk together flour, baking soda, baking powder, and salt. Set aside. This mixture will ensure the cookies rise evenly and keep their tender crumb texture.
Cream the butter and sugar: In a large mixing bowl, beat the softened butter and sugar together until light and fluffy, about 2–3 minutes using a hand mixer or stand mixer on medium speed. This step helps create the signature soft and slightly crisp edges found in Publix bakery cookies.
Add wet ingredients: Mix in the egg, vanilla extract, and almond extract (if using). Scrape down the sides of the bowl to make sure everything is well incorporated. The dough should smell fragrant and creamy at this point.
Combine and chill: Gradually add the dry ingredients to the wet ingredients, mixing until just combined. Do not overmix to keep the cookies tender. Cover the dough and refrigerate for about 30 minutes to firm it up; this helps prevent spreading while baking.
Shape and bake: Preheat the oven to 350°F (175°C). Line a baking sheet with parchment paper. Scoop tablespoon-sized portions of dough, roll them into smooth balls, and place them 2 inches apart on the baking sheet. Flatten each slightly with the bottom of a glass and sprinkle with colored sugar or sprinkles if desired.
Bake for 10–12 minutes, or until the edges are lightly golden but the centers are still soft. Allow cookies to cool on the baking sheet for 5 minutes before transferring to a wire rack to cool completely.