This paper performs a comparative analysis of two-dimensional transient water-copper oxide nanofluid flow and heat transportation inside a right-, acute- and obtuse-angled triangular cavity in the presence of a magnetic field. The vertical and inclined walls of the enclosure are maintained at a constant low temperature whereas the base wall is heated by a uniform thermal condition. The finite element method is used to solve the principal equations of nanofluid within the cavities along with the wall conditions. The outcomes of the present problem for a specific case are verified by the standard published numerical results. For comparative analysis, the isotherms, streamlines, the heat transfer distribution, the average heat transfer rate on the heated wall and within the cavities for the several pertinent parameters of the problem are demonstrated. The result shows that the nanofluid filled obtuse-angled triangular cavity exhibits a higher heat transfer rate for the lower and moderate values of the thermal Rayleigh number whereas for the higher thermal Rayleigh number acute-angled triangular cavity shows better heat transfer performance than that of the other two cases analyzed in the present study. The presence of a magnetic field lessens the heat transfer rate in nanofluid applications. The magnetic field inclination angle controls the flow and heat transfer of nanofluid. Nanofluid flow shows insignificant effects of the friction in cavities compared to that of the base fluid.