In recent years, there has been a growing interest in bound states in the continuum (BIC) in metasurfaces. One particular area of focus is achieving high-quality (Q) factor resonance, as this is crucial for enhancing the performance of refractive index sensors. In this study, a graphene-dielectric hybrid metasurface that supports the bound states in the continuum is proposed. By varying the width of the dielectric rectangle, quasi-BIC resonances with a high Q factor can be excited, and the Q factor can reach 752724.95 and 272004.759 respectively. The analysis of multipole decomposition reveals that the two quasi-BIC resonances are predominantly influenced by the electric quadrupole and magnetic dipole, respectively. Moreover, the transmittance of the resonance point can be changed rapidly with the change of the chemical potential of graphene, so the function of modulation can be realized by changing the chemical potential of graphene. Based on these findings, we have designed a terahertz wave modulator, which exhibits modulation depths of 98.1% and 99.9% at the two resonance peaks, respectively. The corresponding chemical potential shifts are 50 meV and 0.5 eV. Additionally, we have investigated the sensing performance of the metasurface. By analyzing the magnitude of the frequency shifts of the quasi-BIC resonance peaks at different gas refractive indexes, we have determined sensitivities of 740 GHz RIU−1 and 630 GHz RIU−1 at the two resonance peaks. The maximum figure of merit (FOM) values are 132911.39 RIU−1 and 45000 RIU−1, respectively. This research serves as a valuable reference for the design of dynamic optical modulators and sensors operating in the terahertz band.