Beat butter and sugars together in a stand mixer on medium until fluffy, about 4 minutes. Add egg and beat until combined. In a separate bowl, whisk flour, baking powder, and salt together. With the mixer on low, slowly add in flour mixture to the butter mixture. Mix just until combined. Add walnuts and mix until combined.
Grab a large sheet of plastic cling wrap, about 12 inches long. Spoon out dough and place into center of plastic wrap. Form dough into a log about 8 inches long, making sure it's all the same width. Square off the dough as much as you can. It' will be hard to do with the dough soft. You can fix this once the dough is colder. Chill for at least 3 hours.
30 minutes before baking, preheat oven to 350 degrees. Remove dough from fridge and finish squaring the log so that the faces are the shape of squares. Place dough in freezer to get it extra-cold for 20 minutes.
Prepare two baking sheets by lining with parchment paper. Remove dough from freezer and cut into two smaller logs. Slice the first log into 12 cookies and place on one baking sheet, with the cookies about 2 inches from eachother. Repeat with second half f the log and the other baking sheet.
Bake cookies in preheated oven for about 12 minutes or until the edges of the cookie turn deep golden brown. Remove from oven and let them cool for 10 minutes before serving.