earth quake is basically random vibration of the earth in several different ways, S wave, P wave etc. which is a complex and different subject.
X bracing is a way of making the structure stiff, so in short buildings combined with other measures is mostly an effective method.
But in high risers and tall building the critical thing is to mitigate the huge shears that X bracing imparts on the foundation and also make sure the building structure vibration caused the earth quake does not resonate with the vibration of site.
So in tall buildings the strategy is to design the building for earth quake and wind fluttering in a way that the natural frequency of the building is not close to the frequency of earthquake or wind turbulence.
That is why in tall buildings they sometimes use moment frame as opposed to X bracing. These are classified as passive methods.
In some critical structures they insulate the building from the foundation by using rollers and shock absorbers.
Or in some new projects the have active smart earthquake resisting computer controlled hydraulic jacks and braces, which make the building sway, opposing and breaking the impulse of the earthquake.