How can I programmatically get a checkbox value?
Install the Devel module and then use its dpm() function to print a variable to the message area of your page. So inside your submit handler put dpm($form_state-&gt;getValue('field_close_this_ticket')); and you'll see what the error message already is telling you: It's an array. While the logger expects a string. What you are looking for is inside $form_state-&gt;getValue('field_close_this_ticket')['value'], note the ['value'] at the end.
function helper_ticket_comment_submit(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state) {

  if ($form_state-&gt;hasValue('field_close_this_ticket') &amp;&amp; $form_state-&gt;getValue('field_close_this_ticket')['value'] == TRUE) {

    \Drupal::service('messenger')-&gt;addMessage(t('Ticket closed'));
  }
}