Try a different hook for base fields:

    /**
     * Implements hook_entity_base_field_info_alter().
     */
    function mymodule_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) {
      if ($entity_type->id() === 'taxonomy_term') {
        $fields['foo']->addConstraint('Length', ['min' => 5]);
      }
    }

If the field has bundle specific overrides you might need to use both hooks. See https://www.drupal.org/project/drupal/issues/3193351