Recently, various countries from across the globe have been facing the second wave of COVID-19 infections. In order to understand the dynamics of the spread of the disease, much effort has been made in terms of mathematical modeling. In this scenario, compartmental models are widely used to simulate epidemics under various conditions. In general, there are uncertainties associated with the reported data, which must be considered when estimating the parameters of the model. In this work, we propose an effective methodology for estimating parameters of compartmental models in multiple wave scenarios by means of a dynamic data segmentation approach. This robust technique allows the description of the dynamics of the disease without arbitrary choices for the end of the first wave and the start of the second. Furthermore, we adopt a time-dependent function to describe the probability of transmission by contact for each wave. We also assess the uncertainties of the parameters and their influence on the simulations using a stochastic strategy. In order to obtain realistic results in terms of the basic reproduction number, a constraint is incorporated into the problem. We adopt data from Germany and Italy, two of the first countries to experience the second wave of infections. Using the proposed methodology, the end of the first wave (and also the start of the second wave) occurred on 166 and 187 days from the beginning of the epidemic, for Germany and Italy, respectively. The estimated effective reproduction number for the first wave is close to that obtained by other approaches, for both countries. The results demonstrate that the proposed methodology is able to find good estimates for all parameters. In relation to uncertainties, we show that slight variations in the design variables can give rise to significant changes in the value of the effective reproduction number. The results provide information on the characteristics of the epidemic for each country, as well as elements for decision-making in the economic and governmental spheres.