D8 Custom submit handler does not appear to be being called

Can anyone tell me why my custom handler is not being called when I save a new entity please, Im using D8.7

Thanks

use Drupal\Core\Form\FormStateInterface; use Symfony\Component\HttpFoundation\Request;  function testmodule_form_node_form_alter(&$  form, FormStateInterface $  form_state, $  form_id) {   foreach (array_keys($  form['tasks']) as $  action) {     if ($  action != 'preview' && isset($  form['tasks'][$  action]['#type']) && $  form['tasks'][$  action]['#type'] === 'submit') {       $  form['tasks'][$  action]['#submit'][] = 'testmodule_form_submit';     }   } }   function testmodule_form_submit(array $  form, FormStateInterface $  form_state){     drupal_set_message("Why won't this message show?"); }