How do I pass a value to a content type field with a custom submit please
I guess you have multiple options.


You set the field value in the alter as a #value, this is not editable by the user, not like #default_value. Then drupal will save it automatically on successful save.
You set the field value in the validate callback into the $form_state variable. Not too elegant, but the drupal will save the value automatically (normally) on successful submit.
You create a custom submit (as you did) and then you load your node (D7: node_load($nid) D8: \Drupal::entityTypeManager()-&gt;getStorage('node')-&gt;load($id);), set the field value (D7: $node-&gt;field_name[LANGUAGE_NONE][0]['value'] = 'something'; D8: $node-&gt;set('field', 'field_value');), and then save the node (D7: node_save($node);, D8: $node-&gt;save();).
You can use hook_ENTITY_TYPE_insert() to update your field and save the entity again. (https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_ENTITY_TYPE_insert/8.2.x)
You can use hook_ENTITY_TYPE_presave() you just set the field value here, you don't need to save it. Drupal's next step will the save. (https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_ENTITY_TYPE_presave/8.2.x)


For D8 a bit more detailed: https://www.heididev.com/how-programmatically-update-fields-value-drupal-8
And also, maybe the entity is already loaded, check this: https://www.drupaleasy.com/quicktips/drupal-8-getting-entity-id-formstate