How can I get the current node view mode and add to block template suggestion? In my code, I need to get the current view mode of the node to be able to pass it to be used as a block template suggestion.

The function I have set up is able to grab all available view modes, but I just want the current one. Possibly a condition that I haven't come across yet would do the trick? 

function mytheme_theme_suggestions_block_alter(array &amp;$suggestions, array $variables) {
// Add template suggestions based on the current view mode and node type.
  if ($node = \Drupal::routeMatch()-&gt;getParameter('node')) {

   $view_modes = Drupal::entityQuery('entity_view_mode')
   -&gt;condition('targetEntityType', 'node')
   -&gt;execute();

   foreach ($view_modes as $view_mode) {
   $view_mode = str_replace('node.', '', $view_mode);
   $suggestions[] = 'block--' . $node-&gt;getType() .'-'. $view_mode;
  }
 }
}
You say in your comment it is not useful for you and I doubt there are many use cases for this at all, because normally as main content a node is rendered in the full view mode.

Nonetheless trying to answer: A block is built based on contexts and at the moment this is the route, which you have to add as cache metadata to the block. You can then base the decision which view mode the node uses on this route by checking _entity_view of the route definition. If the view mode is controlled by code somewhere else you need to pull this in as context as well.