The polarization topology around the bound states in continuum (BIC) affects the optical vortex (OV) beam generation. We propose a cross-cross-shaped resonator based on a THz metasurface to realize an OV beam generator in real space by exploiting the inherent winding topology around the BIC. The BIC merging at the point Γ is achieved by tuning the width of the cross resonator, which significantly improves the Q factor and enhances the field localization. Furthermore, the switching between the high-order OV beam generator governed by the merged BIC and the low-order OV beam generator is realized. This extends the application of BIC in modulating orbital angular momentum.