How do I get the entity ID when inserting a new node?
The ID isn't available in hook_ENTITY_TYPE_presave() (pre meaning before, as in not saved so the database hasn't assigned it an ID yet), but is definitely available in hook_ENTITY_TYPE_insert().

This will work, for example:

function MODULE_node_insert(NodeInterface $node) {
  // No need to check `isNew()`; if it's in an insert hook, it's new.
  $nid = $node-&gt;id();
}