Preheat oven to 350°F (175°C) and line two baking sheets with parchment paper.
Whisk flour, baking soda, and salt in a medium bowl. Set aside.
Beat softened butter and cream cheese together on medium speed for 2 minutes until light and fluffy.
Add both sugars and beat for 1 more minute until well combined.
Mix in the egg and vanilla extract until just incorporated.
Stir in the flour mixture gradually until a soft dough forms. Do not overmix.
Scoop 1.5 tablespoons of dough, flatten slightly, and press one caramel piece into the center. Wrap dough around caramel and roll into a smooth ball.
Place dough balls 2 inches apart on prepared baking sheets. Sprinkle with flaky salt if using.
Bake for 11 to 13 minutes until edges are set and centers look slightly underdone.
Rest cookies on the baking sheet for 5 minutes before transferring to a wire rack.