Usage patterns
地震が起きるfor an earthquake to occur
A big earthquake occurred in the middle of the night.
地震に遭うto experience/be caught in an earthquake
I was caught in an earthquake while traveling.
地震で〈物〉が倒れるfor something to fall/collapse due to an earthquake
The bookshelf fell over because of the earthquake.
地震に備えるto prepare for an earthquake
I'm keeping water and food ready in case of an earthquake.