Preheat the oven to 350 F. Line an 8x8 inch square cake pan with parchment paper.
Using a hand mixer or in the bowl of a stand mixer, add the sugar, butter, vanilla and salt. Affix the paddle attachment and beat until light and creamed, about 3-4 minutes.
Add the egg together then turn the mixer on low and work up to medium. Beat the mixture until it’s airy, about 2 full minutes.
Sift in the dry ingredients (the baking powder, flour, starch and cocoa) and beat to just mix the dough - stop once you can’t see any unmixed dry bits. Scrape down the bowl to ensure it’s all evenly mixed.
Press the dough into the pan in an even layer, use your fingers, a rubber spatula and/or the bottom of a measuring cup (if it gets sticky, coat it in flour then press it into the dough).
Bake the cookie bar for about 25 minutes, until it’s matte all over and slightly puffed.
Let cool fully before frosting.
To make the frosting: beat the butter with the salt and vanilla then add in the cocoa (if using) and powdered sugar (sift them in if there’s lumps) and beat until the frosting is well mixed. If it’s quite thick, add two tablespoons of milk and beat. Add more milk as needed, if it gets too runny or loose you’ll need to add more powdered sugar.
Spread the frosting over the cooled cookie bar dough - if you like you can add sprinkles on top or chocolate shavings. Transfer to the fridge to set the frosting so it’s easier to slice.
Slice and serve.