A detailed computational study was carried out to explore how the presence of a cavity and cavity angles influence the performance and combustion mechanisms within a scramjet combustor. This research utilized ANSYS Fluent 2021 to create hexahedral meshes and simulate the complex fluid dynamics in scramjet engines equipped with dual strut injectors. The simulations addressed various critical aspects of fluid mechanics, including the continuity, momentum (via the Navier-Stokes equations), and energy equations. These equations were used to model non-reacting flows, while the species transport equations were applied to analyse reacting flows. The turbulence within the combustor was modelled using the standard K-ε model, a common choice for such high-speed aerodynamic evaluations. The study's primary goal was to assess the effects of different geometrical configurations of cavity flame holders on the performance characteristics of an H2-based scramjet combustor overall efficiency, focusing on mixing efficiency, combustion performance, and total pressure loss. Both configurations with and without a cavity were examined. Key findings indicate that incorporating a cavity into the combustor design leads to developing a robust recirculation zone within the cavity area. This recirculation zone is pivotal in enhancing fuel-air mixing and combustion efficiency, with cavity-based combustors showing an earlier onset of combustion and achieving peak combustion efficiencies around 90–95%. The extent of the recirculation region is notably influenced by the proximity of the strut injector to the cavity's length. Additionally, the presence of a shear layer within the cavity generates a weak shock at the cavity's trailing edge. This shock interaction can adversely affect scramjet combustor performance, especially at higher cavity angles (α) and specific geometric configurations, such as an L/D ratio of 4 and α=30°. The L/D ratio of 4 and α=30° combustor model results in a 13.8% increase in turbulence intensity, which raises air-fuel mixing and there by improves mixing and combustion efficiency by 14.23% and 13.34%, compared to the other depth of the cavities. This advantage is critical, especially considering the compact length of the combustor, which is a desirable attribute in scramjet design.