This study explains the effect of magnetic field of the stagnation point flow of a water-based nanofluid graphene oxide-water (GO-W) and graphene oxide-ethylene glycol (GO-EG). Heat transfer analyses are discussed by converting the given partial differential equation into a nonlinear ordinary differential equation using the similarity transformation and solved using an approximate analytical method, namely, the optimal homotopy analysis method (OHAM), to obtain an approximate analytical solution of the nonlinear problem that analyzes the problem. The BVPh 2.0 package function of Mathematica is used to obtain the numerical results. The results of important parameters such as the magnetic field parameter, unsteady parameter, stretching parameter, Prandtl number, Eckert number, and kinematic parameter for both velocity and temperature profiles are plotted and discussed. The convergence control parameter of the approximate analytical method is obtained up to the 25th iteration using the BVPh 2.0 package. The skin friction coefficient and Nusselt number are explained in tabular form.