>>55053937Stated in another thread but I'll repeat here. This was big speculation back during USUM.
Necrozma was never a victim. He got greedy for more light and killed Cosmogs' line to near extinction and absorbed so much it started to create new Pokemon (UBs) as evidenced by his Dex entries. The Tapus were made by Arceus to fight him with the humans, as Kukui stated "everyone fought back against the darkness long ago", which is why Necrozma was dead and buried in Ten Carrot Hill. With it gone, the Tapus distributed its energy to be used by trainers in the form of its Z-Crystals, only centuries later for Necrozma to be ressurrected by Lusamine opening up portals filled with the energy of its creations. It woke up.
You canonically do not catch Necrozma in the post game of Sun and Moon, so Necrozma ran free. Necrozma FUCKED the original timeline (SM), probably killed the player and took its Legendary, and went on to wipe out a good chunk of the world and the far future of SM is Ultra Megapolis/Ultra Ruins/Ultra Space. People finally trapped Necrozma (probably from the help of a Giovannie that took advantage of the situation and formed Rainbow Rocket to secure it and take over the rest of the world, explaining how Rainbow Giovanni can teleport at will), and learned to co-exist with the UBs (which is why you see Kartana being used by trainers), and the Ultra Recon Squad (not aliens, just pale, sun-deprived humans) decided they need to fix the past, so they go back in time and create the USUM timeline, which leads into Sword and Shield.
tl;dr Necrozma was the real villain.