We used numerical modeling to study the evolution of EUV-induced plasmas in argon and hydrogen. The results of simulations were compared to the electron densities measured by microwave cavity resonance spectroscopy. It was found that the measured electron densities can be used to derive the integral amount of plasma in the cavity. However, in some regimes, the impact of the setup geometry, EUV spectrum, and EUV induced secondary emission should be taken into account. The influence of these parameters on the generated plasma and the measured electron density is discussed.