Start by preheating your oven to 350°F (176°C) and lining a baking tray with parchment paper. This helps the cookies bake evenly and prevents sticking, so you can easily lift them off later.
In a medium bowl, whisk together the flour, cocoa powder, baking soda, and salt. Make sure everything is well combined so the cookies have an even texture and consistent chocolate flavor in every bite.
In a large mixing bowl, beat the butter, brown sugar, and granulated sugar together until the mixture becomes light, fluffy, and slightly pale. This step is important because it creates air in the dough, which helps the cookies turn soft and chewy instead of dense.
Next, add the egg and vanilla extract and mix until everything is smooth and fully combined. The batter should look creamy with no visible streaks of egg.
Gradually add the dry ingredients into the wet mixture and mix just until the dough comes together. Avoid overmixing, as this can make the cookies tough instead of soft.
Now take a scoop of dough, flatten it slightly, and place a caramel in the center. Cover it with another piece of dough and gently seal the edges so the caramel is fully enclosed. This step is important to prevent leaking during baking.
Place the stuffed cookie dough balls on the prepared tray, leaving space between them so they can spread. If you like, sprinkle a little sea salt on top for a sweet and salty finish.
Bake for 8–10 minutes, or until the edges look set while the centers still look slightly soft. This is the key to a gooey caramel middle.
Let the cookies cool on the tray for about 5 minutes before transferring them to a rack. They’re best enjoyed warm when the caramel is soft and melted, but they also taste great at room temperature.