Preheat your oven to 350°F (175°C) and line a baking sheet with parchment paper.
In a mixing bowl, cream together the softened butter, granulated sugar, and brown sugar until light and fluffy using an electric mixer or whisk.
Add the pumpkin puree, egg, and vanilla extract to the butter-sugar mixture. Mix until well combined.
In a separate bowl, whisk together the flour, baking soda, baking powder, spices (cinnamon, ginger, nutmeg), and salt.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined. If desired, fold in the chocolate chips or walnuts.
Using a cookie scoop or tablespoon, drop rounded dough balls onto the prepared baking sheet, leaving space between each cookie.
Bake in the preheated oven for 10-12 minutes, or until the edges are lightly golden. The centers may look soft but will firm up as they cool.
Allow the cookies to cool on the baking sheet for a few minutes before transferring them to a wire rack to cool completely.