How can I insert fields from custom content to custom form? I have a problem with form. I had to create a custom content with fields. User can put variables into those fields and save to database, for example &quot;Anna&quot; into column field_student_name in table node__field_student_name. I see this connection where every field from this content type is saved under particular node.
Now I need to create a form with fields, which values will go to the same database tables, for example in this form I have a form field where I put &quot;Tom&quot;, and this value is saved in table node__field_student_name in column field_student_name (the same as Anna in custom content).
At this moment I see two main potential ways to accomplish this task:

insert form from custom content to my new form  with entity.form_builder

I added this two lines info code:
$node = \Drupal\node\Entity\Node::create(['type' =&gt; 'my_students']);
$form = \Drupal::service('entity.form_builder')-&gt;getForm($node);
return $form

And this works fine, but I need only part of those fields :( And I don't wanna see section for admin like &quot;add new revision&quot; etc. Moreover, &quot;Submit&quot; button is on the top of the page

Create a form and in submit function do something like
$node-&gt;set('title', 'titile1')


but I prefer way #1. Besides that, I don't know how to do it with way #2. I don't know how can i put variables from $form['student]' into field_student_name column in node__field_student_name table. Moreover i am not sure if it is ok and if nodes id etc will be added in correct way.
To sum up, I think way #1 is better and easier but I don't have such a big knowledge to do this  and maybe here are more advanced, helpful people who can help me.
EDIT
I've create new mode student_user in student content type:
core.entity_view_mode.node.student_user.yml
langcode: en
status: true
dependencies:
  module:
    - node
id: node.student_user
label: student
targetEntityType: node
cache: true

core.entity_view_display.node.student.student_user.yml
langcode: en
status: true
dependencies:
  config:
    - core.entity_view_mode.node.student_user
    - field.field.node.student.field_name
    - node.type.student
  module:
    - options
    - user
id: node.student.student_user
targetEntityType: node
bundle: student
mode: student_user
content:
  field_name:
    weight: 103
    label: above
    settings:
      thousand_separator: ''
      prefix_suffix: true
    third_party_settings: {  }
    type: list_default
    region: content
hidden:
  links: true

and here i tried with routing
student.student_user:
path: '/test'
defaults:
_entity_view: 'node.student_user'
_title: 'Students'
requirements:
_permission: 'access content'
_entity_access: 'node.view'
I received an error
RuntimeException: Failed to find entity of type node in route named student.student_user

And then i tried with form
i added core.entity_form_display.node.student.student_form.yml and core.entity_form_mode.node.student_form.yml
and then i tried return it in controller
&lt;?php

namespace Drupal\student\Controller;

use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Controller\ControllerBase;
use Drupal\node\NodeInterface;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Url;
use Drupal\Core\Link;
use Drupal\Core\Routing;

class TestController extends ControllerBase {


  function test() { 

    $node = \Drupal\node\Entity\Node::create(['type' =&gt; 'student']);
    
    $form = \Drupal::service('entity.form_builder')-&gt;getForm($node, 'student_form');
   
    return $form;
  }
}
?&gt;

error
Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The &quot;node&quot; entity type did not specify a &quot;student_form&quot; form class.
An entity can have multiple form modes, so you can exclude some fields in different form modes and leave fields that you want to display.
So, you can create form mode &quot;custom_form_mode&quot;, go to manage fields, choose &quot;custom_form_mode&quot; and arrange fields.
In the custom code, you can use the code that you mention in #1, but with an extra argument in the getForm method, which is $operation, and that one is the form mode that you want to use to display form.
$node = \Drupal\node\Entity\Node::create(['type' =&gt; 'my_students']);
$form = \Drupal::service('entity.form_builder')-&gt;getForm($node, 'custom_form_mode');
return $form