Grease a 7 or 8-inch square pan with oil/butter or non-stick oil spray. You can also use any other pan, thali, or a buttered board. Line the pan with parchment paper overhang for easy removal of the fudge. Grease the parchment paper and set the prepared pan aside.
Add condensed milk, sugar, and cocoa powder in a heavy-bottomed, non-stick pan. Switch on the heat to medium-low, stir continuously with a silicon or wooden spatula for about 10 minutes.
Once it begins to thicken, reduce the heat to low, add butter and vanilla extract, cook until it starts leaving the sides of the pan.
Add the coarsely chopped walnuts. Mix well, and cook for few more minutes until the entire mixture comes together and leaves the sides of the pan. Switch off the heat.
Transfer the fudge mixture to a greased tray or a buttered board, spread it evenly with an offset spatula or regular spatula. Sprinkle some chopped walnuts, press it down gently with the spatula. Air-dry, uncovered, for a few hours/overnight or until it sets.
Once it has set, it will appear firm. Lift the fudge out of the pan. Cut into squares or diamonds. Enjoy!