Heat the oven to 350°F and line a baking sheet with parchment paper. The oven should be fully hot before baking.
Melt the butter in a small pan or microwave. Let it cool until warm, not hot.
In a bowl, mix the melted butter, white sugar, and brown sugar until smooth and shiny.
Add the pumpkin purée, egg, and vanilla. Stir until the mixture looks even and creamy.
In a second bowl, mix the flour, baking powder, baking soda, and salt.
Add the dry ingredients to the wet mixture. Stir just until no dry flour shows.
Fold in the chocolate chips or chunks. The dough will be thick and soft.
Scoop large mounds of dough onto the baking sheet, leaving space between them.
Bake for 10–13 minutes. The tops should look set, but the centers should still feel soft.
Let the cookies rest on the pan for 10 minutes before moving them. Sprinkle with flaky salt if using.