How do I get the term name in a custom submit handler? In Drupal 8/9, when you create a new term, the default status message is:

Created new term %term.

%term contains the term name, which is linked to the term page.
I want to override this and remove the link (I want to show the term name, but I do not want to link the term name to the term page).
I thought I could do this in a custom submit handler:
function MYMODULE_term_create_form_submit(array &amp;$form, FormStateInterface &amp;$form_state) {
  \Drupal::messenger()-&gt;deleteByType('status');
  \Drupal::messenger()-&gt;addMessage(t('The group @group-name has been added.', ['@group-name' =&gt; NULL]));
}

However, I don't know how to get the term's name from $form.  I searched the $form object with kint() and I could not find the form name.
Then I looked at core, which does this:
  public function save(array $form, FormStateInterface $form_state) {
    $term = $this-&gt;entity;

    $result = $term-&gt;save();

    $edit_link = $term-&gt;toLink($this-&gt;t('Edit'), 'edit-form')-&gt;toString();
    $view_link = $term-&gt;toLink()-&gt;toString();
    switch ($result) {
      case SAVED_NEW:
        $this-&gt;messenger()-&gt;addStatus($this-&gt;t('Created new term %term.', ['%term' =&gt; $view_link]));
        $this-&gt;logger('taxonomy')-&gt;notice('Created new term %term.', ['%term' =&gt; $term-&gt;getName(), 'link' =&gt; $edit_link]);
        break;

But, I don't have access to the term object in the submit handler.
What's the simplest way to do this without doing a quick-and-dirty patch to core?
In a submit handler you can find the form object in $form_state:
$term = $form_state-&gt;getFormObject()-&gt;getEntity();