Create node upon form submit rendered by block plugin
You are right, the blockSubmit() method is used when you configure the block. The config form is in blockForm(), not in build().

If you put form elements in build() they get rendered like any other render element, but they are not part of the form api and can't be submitted.

If you want to build a form, use a form class. Then you can put the form class in build() by using the formBuilder():

public function build() {

  $content = \Drupal::formBuilder()-&gt;getForm('Drupal\mymodule\Form\MyForm');

  return $content;
}


Better solution:

Instead of building your own form use the entity form for nodes, which you can place in a block with this module: https://www.drupal.org/project/entityform_block