Heat the oven to 350°F. Line an 8-inch square baking pan with parchment, leaving overhang on two sides for lifting.
In a medium bowl, whisk the melted and cooled butter with the packed brown sugar until creamy and slightly thickened, 1–2 minutes.
Whisk in the egg and vanilla extract until the mixture looks glossy and smooth, about 30 seconds.
In a separate bowl, whisk together the all-purpose flour, baking powder, and kosher salt until evenly combined.
Add the dry ingredients to the wet mixture and stir with a spatula just until no dry flour remains; do not overmix.
Fold in the semisweet chocolate chips and chopped walnuts, if using, until evenly dispersed.
Scrape the batter into the prepared pan and smooth the top into an even layer.
Bake until the edges are set and golden and the center is just puffed; a toothpick in the center should come out with a few moist crumbs, 20–25 minutes, rotating the pan halfway through.
Cool in the pan on a rack for 15–20 minutes, then use the parchment overhang to lift the slab out. Cool to just warm or room temperature.
Cut into 16 squares and serve. Store leftovers airtight at room temperature for up to 3 days.