In Pokemon Legends: Z-A, players collect Mega Shards, but their purpose is not immediately clear.
The game introduces Mega Crystals, which can be shattered to obtain Mega Shards, during the early stages in Lumiose City.
Mega Crystals are described as collections of Mega Energy and are easily spotted in the city as rock-like formations with pink shards.
They will explain a good number of things along the way.
Author's summary: Mega Shards collection purpose explained.