Beat the softened butter and sugars together until fluffy. Add in the eggs one at a time and vanilla extract. Mix until everything is combined.
Add the flour, cocoa powder, baking soda, salt, espresso powder, and cornstarch. Mix until everything is combined and your dough forms.
Using a large cookie scoop, scoop out cookie dough onto a baking sheet lined with parchment paper or a silicone baking mat. Bake the cookies in a preheated 350F oven for 13-14 minutes. Once baked, allow the cookies to cool completely.
To make the frosting, beat the softened butter for about a minute. Add in the sweetened condensed milk, powdered sugar, cocoa powder, espresso powder, vanilla extract, and salt. Beat again until everything is combined. Whip the frosting on medium speed for 2-3 minutes until light and fluffy.
Top each cookie with a big scoop of frosting and smooth it out using a spoon or an offset spatula. Top with sprinkles, if desired.
Recipe by our friend Chrissy @TheHungryKitchenBlog