I don't know how you plan on getting the Z-Crystal but, there are two methods
Use Pokémon Bank to get an event with Mew's Z-Crystal, though the event started on January 25, 2017 and ended October 2 2017.
Go to Heahea City with a Mew (USUM) and there will be somebody I think in a building somewhere, if you talk to the person with a Mew, you will get the Z-Crystal.
Method 2 also works for Marshadow, Snorlax, and other event Z-Crystals. Keep in mind you need Pokémon Bank to transfer.