I have to be careful how I say this, because I do not want to defend Hamas. Hamas is terrible. There is no moral equivalency between them and Israel.
Hamas has targeted Israeli civilians. Quite a number of Israeli civilians are also American citizens. There is a lot of dual citizens in the area. There are also Palestinians who are American citizens. The reality is both sides will kill Americans more or less by accident.
As long as those Americans were not targeted for being Americans, it really is not a cause for war for the USA. It is good Biden is trying to get hostages that are American released, and trying to get the Egypt to allow American citizens to leave the Gaza Strip.