How to change the content moderation state in a custom submit handler?
To change the moderation state you need first to get the entity:

$entity = $form_state-&gt;getFormObject()-&gt;getEntity();


and then change the state:

$entity-&gt;set('moderation_state', 'submitted');


and save:

$entity-&gt;save();


All the code:

/**
 * Submit callback to submit for approval
 */
function draft2submit_callback(array &amp;$form, FormStateInterface &amp;$form_state) {
  // Getting the entity.
  $entity = $form_state-&gt;getFormObject()-&gt;getEntity();
  // Changing the moderation state.
  $entity-&gt;set('moderation_state', 'submitted');
  // Saving the entity.
  $entity-&gt;save();
}