Preheat the oven to 350°F (175°C) and line two baking sheets with parchment paper.
In a large mixing bowl, beat the softened butter with an electric mixer until smooth and creamy.
Add the caster sugar and mix until well combined.
Add the brown sugar and continue beating until the mixture becomes light, smooth, and fluffy.
Mix in the vanilla extract until fully incorporated.
Add the eggs one at a time, beating well after each addition until the mixture is smooth and creamy.
Add the flour, baking soda, cornstarch, and salt and mix gently until partially combined.
Add the cocoa powder and Fold everything together with a rubber spatula until a thick chocolate cookie dough forms. Avoid overmixing.
Fold in the chocolate chunks until evenly distributed throughout the dough.
Scoop the cookie dough onto the prepared baking sheets, leaving about 2 inches of space between each cookie. Press a few extra chocolate chunks on top if desired.
Bake for 10 to 12 minutes, or until the edges are set while the centers still look slightly soft.
Let the cookies cool on the baking sheet for 5 minutes before transferring them to a wire rack. Sprinkle with flaky sea salt while warm, if desired.