How can I programmatically distinguish if a block is enabled or disabled from block layout? I have 2 custom blocks. I have added both this in regions of block layout. But when i disabled the block from layout. I must identify it from code or api that the particular block is disabled. How to know that?
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?