01 - Preheat the oven to 350°F. Line a baking sheet with parchment paper.
02 - Using a large mixing bowl, beat together the softened butter, brown sugar, and white sugar until light and fluffy in texture.
03 - Add the egg, vanilla extract, and mashed sweet potato to the bowl. Mix thoroughly until the wet ingredients are fully combined.
04 - In a separate bowl, whisk together the all-purpose flour, cinnamon, baking soda, nutmeg, and salt.
05 - Gradually incorporate the dry ingredients into the wet mixture, mixing just until no dry flour remains. Gently fold in chopped nuts if using.
06 - Drop spoonfuls of dough onto the prepared baking sheet, spacing each portion approximately 2 inches apart.
07 - Bake for 10 to 12 minutes, or until the edges are golden and the centers are set.
08 - Remove the baking sheet from the oven and allow the cookies to cool on the pan for 5 minutes. Then transfer to a wire rack to cool completely.