In 10,000,000 Reasons to Fight!, Ash's Electrium Z abruptly
turned into a Pikashunium Z as he was about to attack Nihilego, the
Ultra Beast holding Lusamine captive. Using the power of this new
Z-Crystal, Ash and Pikachu used 10,000,000 Volt Thunderbolt to defeat
UB-01 Symbiont and free Lusamine. The Pikashunium Z reverted back to
Electrium Z after the move was performed. It reappeared in A Battle
Hand-Off!, where Ash used it to perform 10,000,000 Volt
Thunderbolt once again to defeat Jessie's Mimikyu at the Thrifty
Megamart. Afterwards, it once again reverted back to an Electrium Z.
Ash's Electrium Z transformed into Pikashunium Z once more in From Z
to Shining Z!, appearing in response to Professor Kukui performing
Guardian of Alola with Tapu Koko. With their signature Z-Move, Ash and
Pikachu were able to overpower Tapu Koko's Z-Move and defeat it. This
time, however, the Pikashunium Z did not revert back into an Electrium
Pikashunium Z seems to usually appear in dire situations, and would always revert back to a normal Z crystal after Ash used it, preventing him from using it regularly. Until SM114, where it didn't change back, but that was near the end of the series, so there wasn't really enough time for Ash to actually start using it. Even if he could though, it's still a pretty OP Z-move, and I don't think the show would be very fun to watch if he just used it on everyone :P.
I hope this helps!