The analysis of heat transfer plays a significant role in improving liquid cooling efficiency in cylindrical battery modules. On the basis of the above-mentioned fact, a natural convective magnetohydrodynamic two-dimensional flow of a hybrid nanofluid is examined past a permeable stretching surface with a applications in cooling cylindrical battery packs. A hybrid nanofluid model is developed using silver (Ag) and titanium oxide ( \({\text{TiO}}_{2}\) ) nanoparticles with a base fluid composed of ethylene glycol—water ( \({\text{C}}_{3} {\text{H}}_{8} {\text{O}} - {\text{H}}_{2} {\text{O}}\) ) (50–50%). The current study is structured using partial differential equations, which are subsequently transformed into ordinary differential equations through appropriate similarity transformations. Numerical solutions are derived utilizing the bvp4c inbuilt code in MATLAB software. Furthermore, predictive analysis is performed using a machine learning-based approach, specifically, employs the Levenberg–Marquardt algorithm with well-posed training, testing, and validation datasets. Additionally, a brief error analysis is presented, and the variations of the characterizing parameters are illustrated through graphs. The results indicate that increasing magnetic effects and porosity, along with temperature and space-dependent heat sources, significantly thickens the layer of thermal boundary of the nanofluid. The results show that heat generation leads to a 52.12% increase in temperature. However, a 9.31% drop in the battery's maximum temperature was seen upon switching from silver nanoparticles to titanium oxide nanoparticles. Additionally, the influence of volume fractions on skin friction and the Nusselt number is analysed and illustrated. Additionally, the predictive dataset for the Nusselt number achieves an excellent correlation, reflected by a regression value of 99.58%.