Place the butter in the medium saucepan over medium-low heat and melt completely until it begins to bubble slightly.
Whisk in the cocoa powder and sugar, stirring constantly for about 2 minutes to ensure the cocoa is fully hydrated and the mixture is smooth.
Slowly pour in the heavy cream while whisking vigorously to incorporate, ensuring no dry clumps of sugar or cocoa remain.
Increase the heat to medium and bring the mixture to a gentle simmer; do not let it reach a rolling boil.
Continue to cook for 8 to 10 minutes, stirring frequently with a rubber spatula to scrape the bottom and sides of the pan, until the sauce thickens enough to coat the back of a metal spoon.
Remove the pan from the heat and stir in the sea salt and vanilla extract.
Allow the sauce to cool for 10 minutes in the pan before transferring it to a glass container; it will continue to thicken significantly as it reaches room temperature.