If your justification for the genocide of the Palestinian people is that what Israel’s doing is legal, may I remind you the Holocaust was legal too. Hitler was acting entirely within the laws of Nazi Germany while committing the genocide of the Jewish (and Roma, and gay, and disabled, …) people.
Legal does not mean moral, just, or right.
If something is legal but unjust, it is your moral duty to break the law.
No social progress has ever come about without moral people breaking unjust laws.