WP-CLI plugin install causes PHP fatal error – Using $this when not in object context

public static function Run() {

The “static” here means this function doesn’t have an object context i.e. it’s intended to be called as Block::Run() without actually making a Block. That said, $block = new Block(); $block->Run(); will still work, but it still doesn’t have $this set inside the method.

Instead you can use the class name instead of $this to make a callable for a static method:

class Block{ 
    public static function Run() {           
      add_action('enqueue_block_editor_assets', array('Block', 'RegisterBlock') );

But I’ve no idea how the original code is working in wp-admin. Is it code definitely being called?