My recollection is that Hamas won in both Gaza and the West Bank, but Fatah held a rear-guard action and managed to hold on to the WB but not Gaza. This is how the Palestinian territories ended up with two competing regimes.
Since neither could be said to represent all the Palestinian people (in the two territories) it became impossible to reach any comprehensive understandings, especially as all attempts to form a united negotiating front have failed. Until that happens, there’s absolutely no chance of ending the occupation however much folk may like to demonstrate, chant or even “resist”.