Heat oven to 325°F. Use an ungreased baking sheet with no parchment or silicone mat.
Beat softened butter and sugar for 2–3 minutes until light and fluffy.
Add the whole egg, your extract choice, and the mayonnaise.
Mix until smooth, then scrape the sides of the bowl to ensure everything is fully incorporated.
Add flour and baking powder. Mix until a thick, smooth, pipeable dough forms.
Transfer dough into 2–3 sturdy pastry bags fitted with a piping tip.
Use a cloth bag, heavy-duty bag, or double up disposable bags because spritz dough requires pressure and weak bags can burst.
Pipe shapes directly onto a cold baking sheet for the cleanest lines.
Try rosettes, zigzags, swirls, shells, or long finger cookies.
Add sprinkles before baking,
or bake first, then dip in chocolate and add sprinkles afterward.
Bake at 325°F for 10 minutes, depending on cookie size.
Bake just until the edges look set. Do not let them brown.
Cool on the pan for 5 minutes, then transfer to a rack.