This article examines the impact of polymers on boundary layer flow and heat transfer in non-Newtonian fluids over a magnetized stretching surface. Using the Oldroyd-B model, Reiner-Philippoff fluid stress deformation, and Maxwell’s equations, the study explores polymer behavior in a magnetic field. Similarity transformations are applied to derive the governing equations, which are solved numerically. The effects of polymers and magnetic fields on drag and heat transfer are illustrated graphically. The analysis highlights that introducing polymers increases skin drag and the Nusselt number while reducing the magnetic flux coefficient. Higher polymer concentrations enhance drag and heat transfer. The magnetic field significantly improves heat transfer and reduces skin drag. The research offers valuable insights into the optimal use of polymer additives to modify heat transfer and drag in non-Newtonian fluid flow, contributing to advancements in fluid dynamics and thermal management technologies.