Start by creaming the butter, granulated sugar, and brown sugar until light and fluffy. Add the egg and vanilla extract, mixing until fully combined. This step creates a smooth base and ensures your cookies stay soft and rich.
In a separate bowl, combine flour, baking soda, and salt. Gradually add this mixture into the wet ingredients, stirring gently. Avoid overmixing, as it can make the cookies dense instead of tender.
Fold in the finely chopped rosemary and chunks of dark chocolate. Make sure they’re evenly distributed so each cookie gets the perfect balance of flavor. The rosemary should be subtle, not overpowering.
Scoop the dough into small balls and place them on a lined baking tray. Chill the dough for about 10 minutes if possible, as this helps the cookies hold their shape and improves texture.
Bake in a preheated oven at 180°C (350°F) for 12–15 minutes. The edges should be slightly golden while the center remains soft. Sprinkle flaky sea salt on top right after baking for the best flavor contrast.