The dynamics of enclosure flows are crucial for temperature management in fuel cell systems. Effective temperature control is essential for maintaining optimal operating conditions, thereby enhancing the efficiency and longevity of fuel cells. By refining coolant flow pathways, simulations play a pivotal role in efficiently dissipating the heat generated during electricity production. This study aims to explore the numerical simulation of buoyancy-driven magnetized nanofluid flows within a square enclosure saturated with a porous medium. The goal is to understand how various factors, such as magnetic fields, nanoparticle suspension, thermal radiation, porosity, and internal heat generation/absorption, collectively impact fluid dynamics and thermal distribution. The study employs the finite difference-based Marker-and-Cell (MAC) method, validated against previous studies, to accurately simulate buoyancy-driven flow phenomena. The transverse uniform magnetic field, Nield conditions, and heat generation are considered, with the nanofluid characterized by Buongiorno’s model. The MAC solver is used to solve the dimensionless conservative equations of thermal transport, mass, and momentum transport, ensuring appropriate wall conditions. The impact of magnetic number (0 ≤ Ha ≤ 30), heat generation (−2 ≤ Q ≤ 2), Darcy parameter (10−4 ≤Da ≤10−1), Rayleigh number (104 ≤Ra ≤ 106), Thermal radiation (0 ≤ Rd ≤ 7) and Non-linear temperature parameter (0 ≤λ ≤3) on the fluid flow and thermal transport have been examined. The study comprehensively analyses the interplay of the magnetic field, nanoparticle suspension, thermal radiation, porosity parameter, and internal heat generation/absorption. It concludes that these factors significantly influence fluid dynamics and thermal distribution within the enclosure, providing valuable insights for optimizing temperature management in fuel cell systems.