Get field value and label for a content type using REST API
In the foreach you add just title so it's normal to have only title displayed:
you should populate your array result with the values from your entity, something like:

  foreach ($nodes as $entity) {
    $result[] = [
      'nid' =&gt; $entity-&gt;id(),
      'title' =&gt; $entity-&gt;title-&gt;value,
      'FIELD_NAME_1' =&gt; $entity-&gt;FIELD_NAME_1-&gt;getValue(),
      'FIELD_NAME_2' =&gt; $entity-&gt;FIELD_NAME_2-&gt;getValue(),
       // And so on with other fields.
    ];
  }