How to get parent paragraph from a child block preprocess
The linked answer was using this inside a node hook.
In case of hook_preprocess_block(&amp;$variables) you can try $variables['elements']['content']['#block_content'] instead. This should return the content entity, similar to the linked answer.
Notice: $whateverEntity-&gt;_referringItem is not cache-safe, so if you are referencing the same block on multiple paragraphs, this will not work reliably.