How can I programmatically distinguish if a block is enabled or disabled from block layout?
Use BlockContent::getInstances to get all blocks placed for this custom block, then check for each block instance if it is enabled with $block-&gt;status().

See Get block programmatically and How can we check whether block is enabled or disabled in .theme file?