Preheat oven to 350 degrees. Line 2 large baking sheets with parchment paper.
Whisk the flour, baking powder, baking soda, and salt in a medium bowl.
Cream the butter, granulated sugar, and brown sugar at medium speed until light and fluffy. Reduce the speed to low and add the egg and vanilla extract beating just until incorporated.
Add the flour mixture and beat just until combined. Scraping down the beater and bowl as needed.
Using a 1½ tablespoon cookie scoop, roll the cookie dough into balls and place them on the prepared baking sheet about 2-2½ inches apart. Bake for 10-12 minutes or until golden brown on the bottom. Immediately after baking, make an indent in the top of each cookie using a clean cookie scoop. Fully cool the cookies.
Add the brown sugar, butter, and corn syrup to a heavy skillet. Cook over medium heat until the mixture reaches 235𝆩F, stirring constantly. This takes about 5-6 minutes.
Remove the pan from the heat and stir in the heavy cream, vanilla extract, salt, and chopped pecans. Be careful, as the hot mixture may bubble up.
Working quickly, fill the cookies with the pecan mixture, dividing evenly. The mixture is easier to work with when it is warm.
If desired, melt ½-1 cup semisweet or dark chocolate chips and 1-2 teaspoons coconut oil in the microwave at 50% power for 1-minute intervals, stirring between each interval until the bowl no longer feels hot. Drizzle the melted chocolate over the cookies. Let the chocolate set for several hours.