hook_node_update not working I placed the following function in my custom module.

function MYMODULE_node_update($node) {
  if ($node-&gt;type === 'page') {
    $node-&gt;title = 'test';
  }
}


When editing and saving a node of content type page nothing happens. What can be the issue? 



Problem solved. It seemed to be caused by the following:

my custom module wasn't ending with ?> and above all my module name was custom_site.module and my hooks started with custom. This didn't give problems before with my other hooks so I never noticed. (This helped: https://drupal.stackexchange.com/a/111272/85560)

My module name now is custom.module and now custom_node_presave() works.
You should use hook_node_presave if you want to change a field's value as the hook is invoked from node_save() before the node is saved to the database. And as leymannx stated, make sure you clear the cache before implementing a new hook.