Login user programatically (Create user session)
User::load() loads information about an account, it does not inject or alter the current session in any way. user_login_finalize() is one of the key functions when doing programatic user logins because it will create and set a session for the current user. 

See more:
https://api.drupal.org/api/drupal/core%21modules%21user%21user.module/function/user_login_finalize/8.7.x