Update the block through ajax
Important part you left out is what kind of ajax, is it a form you are submitting or custom javascript which uses ajax to target a controller endpoint? As this is how we return the code of the block.

But the code you are looking for re-rendering a block is:

$id = '' // the number of the block_id
$block = \Drupal\block_content\Entity\BlockContent::load($id);
$render = \Drupal::entityTypeManager()-&gt;getViewBuilder('block_content')-&gt;view($block);
return $render;