How to access field values from a custom block
At the point when you build your block you don't know what other code will put in the page.

As alternative you can use the routing system, because the route is resolved in the bootstrap process (in D8 the symfony framework) before any custom code is run:

if ($node = \Drupal::routeMatch()-&gt;getParameter('node')) {
  $field_my_custom_id = $node-&gt;field_my_custom_id-&gt;value;
}


Of course you don't know if other code will put this field on the page, but you know that the url of the page will produce the specific node as main content.