Form submit callback to remove the selected items.
function submitRemoveSelected(array $form, FormStateInterface $form_state) {
$job_item_ids = array_filter($form_state
->getValue('items'));
tmgmt_cart_get()
->removeJobItems($job_item_ids);
\Drupal::entityTypeManager()
->getStorage('tmgmt_job_item')
->delete(JobItem::loadMultiple($job_item_ids));
$this
->messenger()
->addStatus(t('Job items were removed from the cart.'));
}