> Russia isn’t a party either.
Right, Russia being neither a party nor a non-party who has acceded to ICC jurisdiction on its territory, war crimes committed on Russian soil are not (by territory) within the jurisdiction of the ICC, so would only be subject to the ICC if committed by nationals of a State Party to the Rome Statute. But crimes in Russia aren’t at issue.
> And neither is ukriane.
Ukraine is a non-party that has voluntarily submitted to ICC jurisdiction for war crimes on its territory beginning on a specified date, which gives the ICC the same jurisdiction for such crimes it would have were Ukraine a State Party.