Use template file from module I did this in my custom module:

/**
 * Implements hook_theme().
 */
function my_module_theme() {
  return [
    'my_module' =&gt; [
      'template' =&gt; 'my-module'
    ],
  ];
}

/**
 * Implements hook_theme_suggestions_HOOK_alter() for form templates.
 *
 * @param array $suggestions
 * @param array $variables
 */
function my_module_theme_suggestions_block_alter(array &amp;$suggestions, array $variables) {
  // Block suggestion for specific block bundle.
  if (isset($variables['elements']['content']['#block_content'])) {
    $block_bundle = $variables['elements']['content']['#block_content']-&gt;bundle();

    if ($block_bundle = 'my_block_bundle') {
      array_splice($suggestions, 1, 0, 'my_module');
    }
  }
}


I already created this block bundle in the module, so I want to use my template from module (my-module.html.twig in my_module/templates) for all blocks in this bundle, but with this code all my blocks in this bundle disappeared.

What I'm doing wrong here?
I haven't checked the rest of the code but 

if ($block_bundle = 'my_block_bundle') {


should be 

if ($block_bundle == 'my_block_bundle') {

// you could also use
$suggestions[] = 'your_suggestion' // instead of the splice