Photonic quadrupole topological phases in zero-dimensional cavity with synthetic dimensions