A study was conducted using numerical simulations to analyse the behaviour of heat transfer in a square enclosure filled with a ternary hybrid nanofluid in the occurrence of a magnetic field. The flow in the enclosure is characterised by steady and laminar conjugate-free convection. The enclosure has a vertical border with a finite thickness, while the other three borders are assumed to be very thin. The investigation aims to analyse the impact of several key factors on the average Nusselt number using the finite element method. These parameters include the volume fraction of ternary hybrid type nanoparticles (ranging from 0 to 0.03), Rayleigh number (varying from 103 to 106), solid wall thickness (changing from 0.1 to 0.3), Hartmann number (varying from 0 to 100), and the ratio of thermal conductivities (ranging from 0.1 to 10). A notable enhancement in heat transfer is found by employing a ternary hybrid nanofluid. This enhancement becomes more significant for small Rayleigh numbers, where heat conduction governs the primary means of heat transfer. Also, at low levels of Ra, the development of energy transfer strength becomes insignificant in the existence of a magnetic field. This magnetic field effect is primarily controlled by high values of Ra, which consequently leads to an enhancement in the strength of energy transmission.