Hamas went in and massacred civilians and took hostages. Zelenskyy can clearly emphathize with Israel at this point in time without any further motivation necessary.
Massacred Settlers - whose fathers and grandfathers commited genocide on the Palestinians, forced them out of their motherland and occupied their land which they still continue to do. Ukraine and Palestine are on a fundamentally same position. Both nations are fighting against an Imperialist power to secure their right to existence. Zelensky should not have said anything in his position.