How to return node object on programatically node creation
It's Entity::save() that returns the integer, so:

$node = Node::create([
  'type'        =&gt; 'article',
  'title'       =&gt; 'Druplicon test',
]);

$node-&gt;save();

return $node;