Israel does not target civilians. There are specific terrorist groups (e.g. Hamas) which present Israel with an existential threat. Israel has the right to target them. As is the case, no war is ever clean, and no war is without civilian casualties. Since these terrorist groups are among civilian populations (and in many cases, densely populated, e.g. Gaza) this makes it especially difficult. End result is that Israel ends up killing civilians.
Hamas, on the other hand, does not target the Israel military. It specifically targets civilians. Not only that, but they do not even bother denying that they do and even try to justify it. That is how they get the apt label of "terrorists".
Perhaps you disagree with Israel's tactics. That being the case, I'd be very interested in hearing from you what Israel can do otherwise to deal with Hamas and other terrorist groups. (On the other hand, I'd find it unlikely that you can come up with anything good, so don't bother.)