Programmatically do something when a node is updated
Hooks are still implemented as global, procedural functions; you need to declare them in the .module file just like Drupal 7, not in a controller class:

function MYMODULE_entity_update(Drupal\Core\Entity\EntityInterface $entity) {
  // ...
}


The system will move to OO in Drupal 9.

It's also worth noting that hook_ENTITY_TYPE_update() also exists, so you can still use hook_node_update():

function MYMODULE_node_update(Drupal\node\NodeInterface $node) {
  // ...
}