Correct me if I'm wrong, but Necrozma is an Ultra Beast, isn't it? As well as Cosmog, Cosmoem, Solgaleo, and Lunala?
In any case...
Celesteela > Kartana > Pheromosa > Buzzwole > Necrozma > Xurkitree > Guzzlord > Nihilego
If I include the celestial legends...
Celesteela > Kartana > Pheromosa > Lunala > Buzzwole > Solgaleo > Necrozma > Xurkitree > Guzzlord > Nihilego > Cosmog > Cosmoem
I don't remember where I read it, but Necrozma is an Ultra Beast that has spent a lot of time in our dimension so it is considered as a normal Pokemon so it is both, kinda
In terms of what is straight up called an Ultra beast, like having been named as such, no. But it's still originally from the UB dimension. But without that in mind, it's just a Legendary Pokemon.
>>29944761
They may have been. But what matters is the color of their Dex entries.
So, Necrozma, Solgaleo, Lunala and their prevos are not UBs. They may have been in the past, but not currently in the Pokemon universe
Viability:
Pheromosa > Kartrana > Celesteela > Xurkitree > Buzzwole > Nihilego > Guzzlord
My personal preference:
Buzzwole > Guzzlord > Celesteela > Xurkitree > Nihilego > Pheromosa > Kartrana
>>29944761
Cosmog > Kartana > Guzzlord > Nihilego > Lunala > Buzzwole = Solgaleo > the rest
prove me wrong, you can't