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-game tutorial in Lumiose City.
Mega Crystals are described as collections of Mega Energy and are easily spotted in the city as clusters of rock-like formations and pink shards.
Mega Crystals are collections of Mega Energy.
Author's summary: Mega Shards are collected from Mega Crystals in Pokemon Legends: Z-A.