how to render content type's fields in Custom Module Form
To get an empty form of a content type you would use code like this:

$node = \Drupal\node\Entity\Node::create(['type' =&gt; 'page']);
$form = \Drupal::service('entity.form_builder')-&gt;getForm($node);


To open this form with ajax, put the form in a controller:

public function contenttypeform(NodeTypeInterface $node_type) {
    $node = $this-&gt;entityTypeManager()-&gt;getStorage('node')-&gt;create([
      'type' =&gt; $node_type-&gt;id(),
    ]);
    return $this-&gt;entityFormBuilder()-&gt;getForm($node);
  }


Configure a route for this controller and open the form in an ajax modal like this example from ConfigSync.php:

$links['view_diff'] = array(
            '#type' =&gt; 'link',
            'title' =&gt; $this-&gt;t('View differences'),
            'url' =&gt; Url::fromRoute($route_name, $route_options),
            'attributes' =&gt; array(
              'class' =&gt; array('use-ajax'),
              'data-dialog-type' =&gt; 'modal',
              'data-dialog-options' =&gt; json_encode(array(
                'width' =&gt; 700
              )),
            ),
          );