Take a saucepan and add cocoa powder to it. Combine this cocoa powder with sugar. Stir them together so that they will get mixed properly.
Bring some milk and then add it to the cocoa powder and sugar mixture. Stir both of them well in the mixture.
At high heat, boil up this mixture as it will take a few minutes for it.
Then lower the heat and start simmering the boiled mixture. Turn off the heat and cool your boiled and simmered mixture at room temperature.
Once cooled enough, bring the melted butter and add up to the mixture. Then pour some vanilla extract into the cooked mixture.
Stir well using the spatula. Instead of stirring it is preferred to beat up or blend the mixture.
Your fudge will be starting to get the shape as you continue beating.
Bring a baking pan and use your cooking spray to grease up this pan. You can either use butter for this purpose.
Transfer your mixture to this already prepared pan and then put it in the refrigerator. Once it gets cooled, it will get the required texture. Then you can slice it up into the desired sizes.