In terms of international law, it is not just justified, it is even required. Hamas, after all, is labeled as a terrorist organization.
As far as this specific issue is concerned, I'm afraid opinions on whether this is right or wrong might highly be influenced by our individual leanings, prejudices, biases, and so on.
But as far as the overall implication of this is concerned, it's dangerous. It's prone to abuse. In the first place, how are they linked to Hamas? Do they have solid bases or they're acting only on weak suspicions?
I hope every single user who is affected by this action receives a detailed explanation on how his/her account is linked to a terrorist organization. Providing only general statements is unfair.
Edit: After reading news related to this, I realized this is an old headline. While there are indeed recent freezing of accounts, this news about 190 accounts locked or seized by Israel is relatively old.
[1] And it's not only Hamas that they're linked to but also Daesh and other terrorist groups. This kind of operation has been happening for years already.
[1]
https://www.coindesk.com/business/2023/05/05/israel-has-seized-190-binance-accounts-with-alleged-terrorist-ties-since-2021-reuters/