Programmatically accessing block content
Your code loads a configured block, not the content of a custom block.

This will load the field data of block content:

$custom_block = \Drupal::entityTypeManager()-&gt;getStorage('block_content')-&gt;load('1');
$fieldcontent = $custom_block-&gt;field_myfield-&gt;value;