This is likely related to the US imposing secondary sanctions early this year. Yandex would lose access to their US/EU bank accounts if they were still operating in Russia.
Not just that. Russia is going to confiscate all Western assets in Russia as a counter measure. Valued roughly at 200B USD, mainly owned by EU countries. Yandex would lose their Russian business in any case.
This is Yandex's European arm divesting itself from the Search+Mail business they have in Russia.
In the press release, this was even mentioned - that Yandex's Russian management (aka most of it's management) would be buying out their Russian operations.