Description

Doing the usual method from themes does not work. You need to forcefully override it and there's no way around this according to drupal.org. Even core modules do this.

Steps
  1. define your template, for example 'block--sick-powered-by-custom.html.twig'
  2. implement the _theme hook and tell Drupal to use a new hook
    • Example for the return statement of the _theme hook:

      'block__sick_powered_by_custom' => [
        'template' => 'block--sick-powered-by-custom',
        'base hook' => 'block--sick-powered-by',
      ]
  3. implement the _theme_suggestions_alter hook to add your new suggestion ONLY where you need it; see notes
    • if (in_array('block__sick_powered_by', $suggestions)) {
        $suggestions[] = $hook . '__' . 'sick_powered_by_custom';
      }

      If you don't do this properly, ALL hooks on the website will be overriden.

Notes
  • Make sure your new hook does not interfere with existing hooks! If it does, this won't do anything.