Apartheid has been going on for years and years now. Just like the rest of the oppression and locking people in a closed off ghetto. Its not a reaction to Oct7. Oct7 is a reaction to apartheid (which was a terrorist act which I condemn).
But besides that, you argue that racism, stripping people of their human rights and identity for an entire group of people is fine when a small group of terrorists commit a terrorist attack?
Crimes against humanity are never fine. No matter what happened. When a few commit a terrorist act, or do whatever horrible thing possible, that still shouldn't justify to become a monster yourself in general, but especially not to thousands of innocent civilians.
The reasoning of "yeah but look what they did" was the reason nazi Germany justified deporting jews to Auschwitz. It's the reason why the US invaded and completely wrecked Afghanistan. It's the reason Russia invaded Ukraine and defends it's war crimes. It's the reason for the ethnic cleansing by Israel and why they refuse to cease fire.
Never justify horrible acts like war crimes and crimes against humanity by saying "but look what they did" because crimes against humanity and war crimes do not have an asterisk or ammendment saying "except when-".