Get all available permission after NodeType delete - Drupal 8
You are using the wrong hooks. I am not sure what your objective is, but you want hook_ENTITY_BUNDLE_delete I believe:

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_entity_bundle_delete/8.6.x

function mymodule_entity_bundle_delete($entity_type_id, $entity) : void
{
    if ($entity_type_id == 'node' &amp;&amp; $bundle == 'node type to check') {
        $permissions = array_keys(\Drupal::service('user.permissions')-&gt;getPermissions());

        foreach ($permissions as $permission) {
        // somestuff -&gt; updating database permission table
        }
     }
}


I don't know if you care to check $bundle or not, but if you delete any node type, this code should fire.