How to update a node after loadByProperties?
Assuming you response array will contain one node as suggested by the variable name $profileNode 

here is a suggestion to make it :

$profileNode = \Drupal::entityTypeManager()
    -&gt;getStorage('node')
    -&gt;loadByProperties(['field_user_id' =&gt; $id]);
// Get the node object.
$profileNodeObject = reset($profileNode);
if ($profileNodeObject) {
  // Make the changes we want : per example set the author to user 4.
  $profileNodeObject-&gt;setOwnerId(4);
  // Save the changes.
  $profileNodeObject-&gt;save();
}