As it is technically part of Marshadow's level up move set, you can teach it with a heart scale by talking to the move reminder at the Mount Lanakila peak Pokémon centre