Add/remove roles after submitting a certain webform
\Drupal::currentUser() loads only an Account, but you need a fully loaded entity to modify and save the user:

$account = \Drupal::currentUser();
$user = \Drupal\user\Entity\User::load($account-&gt;id());
$user-&gt;addRole('styled');
$user-&gt;save();