The Gardevoirite was available in two different events over the course of Pokémon Sun/Moon's run. One was available during the tiny tourney Mega Stones event, running worldwide from July 4 to August 31, 2017. This item was available as a serial code for those who completed at least three battles during the tiny tourney competition on the Pokémon Global Link. The other event was the Fifth Mega Stone Gift, run worldwide from August 10 to October 31, 2017. It was distributed to players who inserted the password POYONG.
These events, however, are no longer available, and the Gardevorite can only be obtained through trading with another game.
Source