Passing Node ID/Title to Next Page Webform Field
Assuming you want: The user will create a node. Upon submission a form will be displayed showing the node id pre-filled in a form.
Make a module called example:

// example.module:
// we created a node type "product" (using UI). Saving this content
// will trigger the product form
/**
 * Implements hook_ENTITY_TYPE_insert().
 * @param \Drupal\node\NodeInterface
 */
function example_node_insert(NodeInterface $node) {
  if ($node-&gt;bundle() == 'product') {
    $nid = $node-&gt;id();
    $response = new \Symfony\Component\HttpFoundation\RedirectResponse(\Drupal\Core\Url::
    fromRoute('product.form', ['nid' =&gt; $nid])-&gt;toString());
    $response-&gt;send(); // When OO we will return the response object instead
  }
}

// example.routing.yml
product.form:
  path: '/form/product/{nid}'
  defaults:
    _form: '\Drupal\example\Form\ProductForm'
    _title: 'Product Form'
  requirements:
    _permission: 'access content'

// src/Form/ProductForm
&lt;?php

namespace Drupal\example\Form;


use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\node\NodeInterface;

class ProductForm extends FormBase {

  /**
   * @var NodeInterface
   */
  protected $node;

  public function getFormId() {
    return 'example_product_form';
  }

  public function buildForm(array $form, FormStateInterface $form_state, $nid = null) {
    // if you need to load the node
    // $this-&gt;node = NodeInterface::load($nid);

    $form['node_id'] = [
      '#type' =&gt; 'textfield',
      '#title' =&gt; 'Node ID',
      '#value' =&gt; $nid,
    ];

    return $form;
  }

  public function submitForm(array &amp;$form, FormStateInterface $form_state) {
    // TODO: Implement submitForm() method.
    // you can redirect back to the node
  }

}


When dealing with this issue please realize the node id is not available until you save the node.