Silicon carbide is a very promising platform for quantum applications because of extraordinary spin and optical properties of point defects in this technologically-friendly material. These properties are strongly influenced by crystal vibrations, but the exact relationship between them and the behavior of spin qubits is not fully investigated. We uncover the local vibrational modes of the Si vacancy spin qubits in as-grown 4H-SiC. We apply the resonant microwave field to isolate the contribution from one particular type of defects, the so-called V2 center, and observe the zero-phonon line together with seven equally-separated phonon replicas. Furthermore, we present first-principles calculations of the photoluminescence lineshape, which are in excellent agreement with our experimental data. To boost up the calculation accuracy and decrease the computation time, we extract the force constants using machine learning algorithms. This allows us to identify dominant modes in the lattice vibrations coupled to an excited electron during optical emission in the Si vacancy. The resonance phonon energy of 36 meV and the Debye-Waller factor of about 6% are obtained. We establish experimentally that the activation energy of the optically-induced spin polarization is given by the local vibrational energy. Our findings give insight into the coupling of electronic states to vibrational modes in SiC spin qubits, which is essential to predict their spin, optical, mechanical and thermal properties. The approach described can be applied to a large variety of spin defects with spectrally overlapped contributions in SiC as well as in other 3D and 2D materials.