This work delves into the intricate realm of epidemic modeling under the influence of unpredictable surroundings. By harnessing the power of white noise and Lévy noise, we construct a robust framework to capture the behavioral characteristics of the COVID-19 epidemic amidst erratic changes in the external environment. To enhance our comprehension of the intricate dynamics of the coronavirus, we conducted an investigation using a stochastic SIQS epidemic model that incorporates a dedicated compartment to represent populations under quarantine. Thanks to stochastic modeling techniques, we account for the inherent randomness in the transmission process and provide insights into the potential variations and uncertainties associated with the progression of the epidemic. Specifically, we show that the asymptotic behavior of our model is perfectly governed by two thresholds, Rσ,J and Rσ,J′. That is to say, if Rσ,J<1, the disease will be removed from the population, while it will persist if Rσ,J′>1. Our highlight lies in obtaining the necessary and sufficient conditions for extinction in the absence of jump noise, namely Rσ,0=Rσ,0′. This means that our sufficient conditions for extinction for the jump case are also almost necessary. Finally, we present a set of computational simulations to validate our theoretical findings, supporting the results developed throughout this article. Overall, this research contributes to our understanding of the COVID-19 pandemic and its impact on the global population.