How do I use user_save() to add a new category? In Drupal 7,  there is user_save($account, $edit = array(), $category = 'account'). How do I create a new category for an existing account in Drupal 8? 

Also, $user = \Drupal::currentUser(); and $user->save(); gives error as well. I need to attach a form element value to user object.

How to link a login form element to user account on logging in?
The category concept has been removed. So the answer is, you don't.

Not sure what you are trying to do, if you need a better answer, you will need to provide more details.

User is an entity with fields. There's nothing special about it, you change and save data in the same way like any other entity.