How can I use entity save in drupal 8
if you only want save node type. You can use code example below

&lt;?php

use Drupal\node\Entity\Node;
$node = Node::create([
  // The node entity bundle.
  'type' =&gt; 'article',
  'langcode' =&gt; 'en',
  'created' =&gt; REQUEST_TIME,
  'changed' =&gt; REQUEST_TIME,
  // The user ID.
  'uid' =&gt; 1,
  'title' =&gt; 'My test!',
  // An array with taxonomy terms.
  'field_tags' =&gt;[2],
  'body' =&gt; [
    'summary' =&gt; '',
    'value' =&gt; '&lt;p&gt;The body of my node.&lt;/p&gt;',
    'format' =&gt; 'full_html',
  ],
]);
$node-&gt;save();