>>43755158It's all mental power since psychic is a type that has been related to cosmic shit for a long time in the franchise. Necrozma and Cosmog's line are pokemon that travel in the space between parallel worlds (Ultra Space) with their mental power, and said power (manifested throught light) can energize stuff like... well, pure energy. As the Ultra Recon Squad explains, Necrozma can spread this energy, this helps to the development of life (see how berry trees mysteriously produce multiple berries all from the same tree and without anyone's help, Alola is so full of life this shit produces a shitton just fine) and can make pokemon stronger (totem pokemon) and in some cases they even evolve (in the darwinian sense of the word) based around this energy (Ultra Beasts), but it's all fortuitous as it only happens when pokemon are constantly exposed to the "light" coming from an Ultra Wormhole (opened by said light).
But there's another way for this energy to help pokemon, as the alolan myth explains, Solgaleo and Lunala were able to give the four Tapu their own Z-crystal, and the Ultra Squad also explains how some parts of Necrozma's body formed Z-Crystals. This is what happens when a high concentration of the "light" Cosmog line and Necrozma manipulate is solidified. On its own, the pokemon can't make use of this energy, but with the help of a human sharing his mental power with pokemon, the crystal activates and energizes pokemon's attack, that's why you can only use a Z-move once, because trainers end mentally exhausted after one, and in Necrozma's case the Z-move consumes SO MUCH mental energy your character almost faints.