Israel did this by imprisoning and torturing the Palestinian people.
Hamas didn't exist before that.
The people of Gaza didn't put Hamas in power. Most of the people in Gaza weren't alive when Hamas seized power. Fewer still were of voting age, and even fewer actually voted for Hamas... and it wasn't this Hamas.
Donald Trump tore up the six nation deal with Iran. Donald Trump moved the US embassy to Jerusalem. He gave the green light to unlimited settlements in the West Bank and East Jerusalem. He approved the Israeli annexation of the Golan Heights. He cut deals with the Gulf Arabs and left the Palestinians to suffer and die. Trump started this latest round of violence as surely as if he had fired the first shot.