How can I add all the existing content types into a dropdown list? In Drupal 8, I am using the Config Pages module to set up a configuration page for a custom module. How can I add all the existing content types into a dropdown list?
In your custom form, in add $options to your content type list field.
the following snippet get list of all the content type names for you;

   $node_types = \Drupal\node\Entity\NodeType::loadMultiple();
    // If you need to display them in a drop down:
    $options = [];
    foreach ($node_types as $node_type) {
      $options[$node_type-&gt;id()] = $node_type-&gt;label();
    }