The discovery of dark matter (DM) at XENONnT or LZ would place constraints on DM particle mass and coupling constants. It is interesting to ask when these constraints can be compatible with the DM thermal production mechanism. We address this question within the most general set of renormalisable models that preserve Lorentz and gauge symmetry, and that extend the Standard Model by one DM candidate of mass $m_{rm DM}$ and one particle of mass $M_{med}$ mediating DM-quark interactions. Our analysis divides into two parts. First, we postulate that XENONnT/LZ has detected $mu_Ssimmathcal{O}(100)$ signal events, and use this input to calculate the DM relic density, $Omega_{DM} h^2$. Then, we identify the regions in the $M_{med} - Omega_{DM} h^2$ plane which are compatible with the observed signal and with current CMB data. We find that for most of the models considered here, $mathcal{O}(100)$ signal events at XENONnT/LZ and the DM thermal production are only compatible for resonant DM annihilations, i.e. for $M_{med}simeq2 m_{DM}$. In this case, XENONnT/LZ would be able to simultaneously measure $m_{DM}$ and $M_{med}$. We also discuss the dependence of our results on $m_{DM}$, $mu_S$ and the DM spin, and provide analytic expressions for annihilation cross-sections and mediator decay widths for all models considered in this study.