How do I access profile fields? I have installed the Profile module. I am trying to programmatically load profiles. The code works, but I am not able to access any field value.
class IdCardController extends ControllerBase {

  /**
   * Init id card download.
   */
  public function initDownload(User $user) {
    
    $user_profile = $this-&gt;entityTypeManager()-&gt;getStorage('profile')-&gt;loadByProperties([
      'uid' =&gt; $user-&gt;id(),
      'type' =&gt; 'personal_information',
    ]);
    kint($user_profile);
  }
}

Using kint(), I can see all methods are protected.
You could examine the Profile Entity class here profile / src / Entity / ProfileInterface.php, showing you a list of public methods including its getter methods, eg.:
$profile-&gt;getCreatedTime();

Additionally and similar as with Entities in general, you can also call data via either $entity-&gt;get('field_name')-&gt;getValue() or $entity-&gt;field_name-&gt;getValue().
See more on that here: Get information from an entity/ Entity methods
So if you have a Profile Entity with a field machine name address, then you could get its data like:
$profile = \Drupal\profile\Entity\Profile::load(123);
$profile-&gt;get('address')-&gt;getValue();
$profile-&gt;address-&gt;getValue();