Surface charging phenomena on the lunar surface are significantly influenced by topographical features such as craters, boulders, and cavities. This study employs Particle-in-Cell (PIC) simulations to explore how the size of surface cavities affects charging under typical solar wind conditions. Our results show that cavities smaller than the lunar sheath thickness develop strong positive potentials at the depths due to ion currents. However, as cavity size increases beyond the sheath thickness, the influence of ion currents is reduced, resulting in a more moderate potential change inside the cavities. This transition is driven by a shift from surface-charge-dominated ($\sim\!size^2$) to space-charge-dominated ($\sim size^3$) electrostatic structures, as larger cavities allow for greater electron inflow and contribution of the space charge. These findings suggest that both macroscopic and microscopic surface irregularities need to be evaluated according to their spatial scale when considering a global charging environment, which would be significant for understanding dust transport and potential breakdown processes.