In this paper, a numerical investigation using the finite element method on the cooling capacity of an electronic heat sink has been presented. This heat sink is intended for cooling applications of micro-computer CPUs. It deals with a parallelepipedal block with rectangular fins, filled with a nanofluid and crossed by four cylindrical pipes in which a cooling gas flows and dissipates the heat generated by the processor. Indeed, the cooling occurs by three transfers: the first one evacuates the heat from the processor towards the gas, the second one transfers this heat towards the nanofluid and the last one is cooled from the ambient air by means of the fins laterally arranged on the block. From this work, it has been planned to contribute to the study of the behavior of a nanofluid in the heat sink in the presence of a uniform magnetic field in order to enhance the operating and cooling performances. The effects of some control parameters have been highlighted on the hydrodynamic, thermal, and mass behavior of the nanofluid, namely: the Rayleigh number (103 ≤ Ra ≤ 105), the Hartmann number (0 ≤ Ha ≤ 100), the angle of inclination of the magnetic field (0 ≤ γ ≤ 90°) and the nanoparticles diameter (1 nm ≤ dp ≤ 10 nm). On the other hand, a new fin design has been proposed in this study allowing the enhancement of the heat exchange rate with ambient medium. The studied phenomenon is governed by the equations of the two-phase nanofluid model proposed by Buongiorno and which describe the following balances: mass, momentum, energy and nanoparticles. The system of partial differential equations with initial-boundary conditions has been solved by the finite element method. After performing a mesh independence check and validating with previous papers, the results of the investigation were presented. They showed that the application of a magnetic field significantly reduces the rate of heat exchange. However, increasing the angle of inclination of this field promotes convective heat transfer. Moreover, the use of zigzag fins improves the cooling rate by about 4% for amplitude of 0.05 compared to the standard configuration.