Preheat your oven to 350°F (175°C). Place a large roasting pan filled with about an inch of hot water on the bottom rack. This will create a water bath for the flan to bake in.
In a small saucepan, combine the granulated sugar and water over medium-high heat. Stir until the sugar dissolves, then let it simmer without stirring. Swirl the pan occasionally until the mixture turns a deep golden brown, about 10 minutes. Be careful not to let it burn.
Pour the caramelized sugar into a 9-inch round cake pan or individual ramekins. Tilt the pan or ramekins to evenly coat the bottom with the caramel. Set aside to cool and harden.
In a large mixing bowl, whisk together the eggs, sweetened condensed milk, whole milk, cocoa powder, vanilla extract, and salt until well combined and smooth. Make sure the cocoa powder is fully incorporated to avoid any lumps.
Gently pour the flan mixture over the caramel in the cake pan or ramekins. If using ramekins, divide the mixture evenly among them. Tap the pan or ramekins gently on the counter to release any air bubbles.
Carefully place the cake pan or ramekins into the preheated oven, on the middle rack. Bake for approximately 45-50 minutes for a cake pan, or 30-35 minutes for ramekins, or until the flan is set around the edges but still slightly jiggly in the center.
Remove the flan from the oven and let it cool to room temperature in the water bath. Once cooled, cover the pan or ramekins with plastic wrap and refrigerate for at least 4 hours, or overnight, to allow the flan to fully set.
When ready to serve, run a knife around the edge of the cake pan or ramekins to loosen the flan. Invert a serving plate over the pan or ramekin and quickly flip it over, allowing the flan to release onto the plate. Gently lift the pan or ramekin, revealing the beautiful caramelized top of the flan.