How could I check that the field's value has indeed been modified? Is there a hook which could be used to execute code when a specific field of a custom content type is updated? Is there a specific hook, or should I use hook_node_presave()? In that case, how could I check that the field's value has indeed been modified?
Using hook_entity_presave():


  You can get the original entity object from $entity->original when it is an update of the entity.


So something like this ought to work:

function foo_node_presave(\Drupal\node\NodeInterface $node) {
  if (!$node-&gt;isNew() &amp;&amp; $node-&gt;get('field_bar')-&gt;getValue() != $node-&gt;original-&gt;get('field_bar')-&gt;getValue()) {
    // ...
  }
}