Unable to auto-create node from webform
Do you have a node type "company" that exists?
Is the machine name correct?
Does your $title have a correct value?

You might just be missing -&gt;enforceIsNew() but I'm not sure if that is required.

Try the below code and build further from there. (Edit the required values!!)

$newNode = Node::create([
  'type' =&gt; 'your_node_type_machine_name',
  'title' =&gt; 'the title of the new node',
]);

$newNode-&gt;enforceIsNew();
$newNode-&gt;save();


Also make sure you include

use Drupal\node\Entity\Node;


But looks like you already have that.