How can I create Change Password block? We can create reset password block by \Drupal::formBuilder()-&gt;getForm('Drupal\user\Form\UserPasswordForm') in d8, but change password block \Drupal::formBuilder()-&gt;getForm('Drupal\user\Form\UserPasswordResetForm') didn't work for me.
This is my code:

public function build(Request $request) {
  $session = $request -&gt; getSession();
  $session-&gt;set('pass_reset_hash', $hash);
  $session-&gt;set('pass_reset_timeout', $timestamp);
  $user = \Drupal::currentUser();
  $expiration_date = $user-&gt;getLastLoginTime();

  $myblock = \Drupal::formBuilder()-&gt;getForm('Drupal\user\Form\UserPasswordResetForm::class', $user, $expiration_date, $timestamp, $hash);
  return array(
    '#type' =&gt; 'markup',
    '#markup' =&gt; drupal_render($myblock),
  );
}
First of all try to take a look at the buildForm method in the UserPasswordResetForm class, it takes some parameters.
So you must call getForm like this:
\Drupal::formBuilder()-&gt;getForm('Drupal\user\Form\UserPasswordResetForm::class', $user, $expiration_date, $timestamp, $hash);

This is the function docs,

$user = User requesting reset.
$expiration_date = Formatted expiration date for the login link, or NULL if the link does not expire.
$timestamp = The current timestamp.
$hash = Login link hash.

So when those parameters are added the form should render perfectly.