Programmatically-delete-custom-content-block-drupal-10-deploy-hook

Getting the namespace via Drupal’s API documentation: https://api.drupal.org/api/drupal/core!modules!block_content!src!Entity!BlockContent.php/class/BlockContent/

/**
 * Remove unused content block.
 */
function mass_deploy_delete_old_footer_content_block() {
  $block = \Drupal\block_content\Entity\BlockContent::load(2);
  $block->delete();
}