A two-fluid, phase transition-based multiphase flow model is employed to simulate the dynamics of phase transition between liquid and vapor phases during shock wave and rarefaction wave propagation in underwater explosions. The aim is to understand the influence of a rigid wall on the cavitation evolution process and the cavitation collapse load, considering various charge quantities and water depths. The evolution of crucial physical qualities, such as the density, pressure, and the cavitation domain, within the flow field are analyzed and summarized. The presence of a rigid wall is found to significantly impact the cavitation evolution process in underwater explosions. It affects the shape, size, and dynamics of the cavitation domain, as well as the interaction between the explosion and the surrounding fluid. Specifically, the reflected wave on the wall influences the cavitation collapse load, leading to notable differences in the collapse time and collapse pressure compared to free-field conditions. Under different operating conditions, the size and position of the cavitation domain exhibit distinct changes. The proximity of the rigid wall results in unique patterns of cavitation domain evolution, which in turn lead to variations in the pressure distribution and the emergence of new cavitation regions. The findings of this study provide valuable insights into the behavior of cavitation and atomization induced by underwater explosions near the free surface. The understanding gained from these investigations can contribute to the development of effective safety measures and protective strategies in marine and underwater engineering applications. By accurately predicting and mitigating the effects of cavitation, it is possible to enhance the design and operation of underwater structures, ensuring their integrity and minimizing the potential risks associated with underwater explosions.