How to add a role to specific product type customer?
You're using $user before setting it. You have a CustomId it looks like, but have not created an instance of User with that Id.

Perhaps something like this:

public function onOrderPlace(WorkflowTransitionEvent $event) {
  $userId = $event-&gt;getEntity()-&gt;getCustomerId();
  $user = \Drupal\user\Entity\User::load($userId);
  $user-&gt;addRole('darshan');
  \Drupal::logger('mycustom_module_name')-&gt;notice('Role "darshan" added to user ' . $user-&gt;getDisplayName());
}