How do I know when Hooks are called and in what order?
You're looking for an event, not a hook to do this in 8.x

Specifically, you're looking for the RESPONSE event, see \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber for an example. Create a class like that, register it in yourmodule.services.yml and then do whatever you want with the $response object.