Hermite–Gaussian (HG) laser beam with transverse electromagnetic (TEM) mode indices (m, n) of distinct values (0, 1), (0, 2), (0, 3), and (0, 4) has been analyzed theoretically for direct laser acceleration (DLA) of electron under the influence of an externally applied axial magnetic field. The propagation characteristics of a TEM HG beam in vacuum control the dynamics of electron during laser–electron interaction. The applied magnetic field strengthens the
$\vec v \times \vec B$
force component of the fields acting on electron for the occurrence of strong betatron resonance. An axially confined enhanced acceleration is observed due to axial magnetic field. The electron energy gain is sensitive not only to mode indices of TEM HG laser beam but also to applied magnetic field. Higher energy gain in GeV range is seen with higher mode indices in the presence of applied magnetic field. The obtained results with distinct TEM modes would be helpful in the development of better table top accelerators of diverse needs.