How to render a block provided by a contrib module in a node template I installed Better Social Sharing Buttons and I can not understand how to programmatically display the block of this module in node.html.twig. I display the blocks created by me like this:

function MYTHEME_preprocess_node(&amp;$variables) {
  $block_entity = Drupal\block_content\Entity\BlockContent::load(6);
  $block_view = \Drupal::entityTypeManager()-&gt;getViewBuilder('block_content')-&gt;view($block_entity, 'foo bar');
  $variables['MyCustomBlock'] = $block_view;
}


and then {{ MyCustomBlock }} in node.html.twig.

How to display the block created by the Better Social Sharing Buttons module?
Go for Twig Tweak.


  Twig Tweak is a small module which provides a Twig extension with some
  useful functions and filters that can improve development experience.


Then it's just

{{ drupal_block('better_social_sharing_buttons_block') }}


Read the docs about Rendering blocks with Twig Tweak.


  This subject is rather confusing because too many things in Drupal are
  referred to as "Blocks". So it is essential to understand what kind of
  block you are going to render. This guide covers three main cases you
  may deal when rendering blocks in a Twig template.