In the current work, flow of 2-D MHD Walters'B viscoelastic fluid is discussed in the existence of elastic deformation, Cattaneo–Christov Heat Flux Model (CCHFM), heat source, Newtonian heating, viscous dissipation and porous medium. Dimensionless equations that are in charge of the problem's analysis are produced by using the suitable similarity transformation, and Optimal Auxiliary Functions Method (OAFM) is employed to solve them. In the ongoing investigation, the main results are decreasing behavior of temperature profile for the thermal relaxation parameter and elastic deformation parameter, while the reverse effect is noticed while increasing the Weissenberg number and porosity parameter. Our findings reveal significant insights into the fluid dynamics and heat transfer characteristics. Integrating the Cattaneo–Christov heat flux model and elastic deformation analysis in Walters'B viscoelastic fluid flow having its importance in polymer processing, aerospace engineering and waste treatment systems.