How to get earthquake on Metagross?

Unfortunately, it is not possible to get Earthquake on Metagross. Metagross is a Steel/Psychic-type Pokemon, and Earthquake is a Ground-type move. Steel-type Pokemon are immune to Ground-type moves, so Metagross cannot learn Earthquake.