The thesis should always come first because it tells readers what your essay is about. The hook comes at the end, it is used to introduce new information that ties into the argument or summarises points made in previous sentences.