Saving Custom Field Values to User Profile
I used August's answer, but fixed it:

Put this at the top:

use craft\elements\User;


Then the updating code

$myUser = Craft::$app-&gt;getUser()-&gt;getIdentity();
$myUser-&gt;setFieldValue('fieldHand', 'value');

Craft::$app-&gt;getElements()-&gt;saveElement($myUser, false);