Pressure is a significant parameter to investigate the properties of matter. The phenomenon of pressure-induced magnetic phase transition has attracted great interest due to its ability to detect superconducting behaviour at high pressures in diamond anvil cell. However, detection of the local sample magnetic properties is a great challenge due to the small sample chamber volume. Recently, in situ pressure-induced phase transition has been detected using optically detected magnetic resonance (ODMR) method of the nitrogen vacancies (NV) centers in diamond. However, the NV centers with four orientation axes and temperature-dependent zero-field-splitting present some difficulty to interpret the observed ODMR spectra. Here, we investigate and characterize the optical and spin properties of the implanted silicon vacancy defects in 4H-SiC, which is single-axis and temperature-independent zero-field-splitting. Using this technique, we observe the magnetic phase transition of a magnetic Nd2Fe14B sample at about 7 GPa. Finally, the critical temperature-pressure phase diagram of the superconductor YBa2Cu3O6.66 is mapped and refined. These experiments pave the way for the silicon vacancy-based quantum sensor being used in situ magnetic detection at high pressures.