The effect of confinement on the propagation of lean hydrogen-air flames in a Hele-Shaw cell, formed by two parallel plates separated by a small distance, is studied numerically. The influence of momentum loss on the flame structure and propagation rates is analyzed by examining two limits: (i) the limit of very small distance between the plates, for which a quasi-three-dimensional (quasi-3D) Darcy's law-based approximation is used, and (ii) the limit of unconfined geometry, for which the full set of two-dimensional (2D) Navier-Stokes equations is considered. The influence of heat losses is also included. The chemistry is described by a onestep reduced kinetics with a simple model for transport properties. The results demonstrate that momentum loss primarily increases the flame surface area by elongating the cellular structures in a finger-like form, with a relatively small enhancement of the reactivity at the flame front, consistent with a mechanism of hydrodynamic nature. This elongation leads to approximately a 50% increase in flame speed compared to the absence of confinement. Conversely, heat losses are observed to flatten the large-scale continuous flame front and, if significant enough, can lead to the formation of isolated propagating flame cells of the two-headed or, ultimately, one-headed type. The present results are in good agreement with recent experiments.