Hamas might not exist, but unless you can travel back in time, that doesn't answer the question what to do about Hamas today.
Hamas is a terror organization, they've been in power in the Gaza strip for the last 17 years, they terrorize the Palestinian population in Gaza, and they desperately need the conflict to stay alive so they don't lose relevance.
As things are today, treating the Palestinians well, giving them aid, food, water and the promise of a brighter future is a direct threat to Hamas. That's absolutely not to say that those things shouldn't be done - it's just to say that these things pose a direct threat to Hamas's position of power in Gaza. That's why Hamas reroutes international help and keeps it from reaching the Palestinian population, why they stage terrorist attacks against Israel, why they torture and murder "collaborators," why they place their infrastructure in schools and mosques and hospitals, why they use Palestinians as human shields.
So lacking the option of traveling back in time and preventing the creation of Hamas, what should be done in a world where Hamas exists, has been in power for many years, and has no intention of ever ceasing its terrorism?