In Pokemon Legends: Z-A, players collect Mega Shards, but the game doesn't immediately explain their purpose.
The game starts with a tutorial, where the player's rival guides them through Lumiose City, explaining various concepts, including Wild Zones and Battle Zones.
During this time, players encounter Mega Crystals, which can be shattered to obtain Mega Shards. These crystals are described as collections of Mega Energy and are easily found in the city.
Mega Crystals are clusters of rock-like formations and pink shards.
Although the true purpose of collecting Mega Shards isn't immediately clear, players will find them early on in the game.
Author's summary: Pokemon Legends: Z-A's Mega Shards are collected from Mega Crystals.