How can retrieve users custom fields only?
You can do this by going via the element's field layout:

$user = \craft\elements\User::find()-&gt;id(1)-&gt;one();

$fields = $user-&gt;getFieldLayout()-&gt;getFields();


This will return you an array of all the fields (fields, not values) attached to your user.