I have copied the Laravel password resetting up to the 3third part OF the code it's all good on the 4th part it won't work that after clicking reset it should redirect me to the login page.
First route the view
Second the View submit
Third The view of the reset link sent to the email.
Fourth Is the submit of the reset link is not working as intended
after clicking submit nothing happened and password didn't change at all
Here are the routes
Route::get('/forgot-password', function () {
  return view('auth.forgot-password');
})->middleware('guest')->name('password.request');

Route::post('/forgot-password', function (Request $request) {
  $request->validate(['email' => 'required|email']);

  $status = Password::sendResetLink(
    $request->only('email')
  );

  return $status === Password::RESET_LINK_SENT
    ? back()->with(['status' => __($status)])
    : back()->withErrors(['email' => __($status)]);
})->middleware('guest')->name('password.email');

Route::get('/reset-password/{token}', function (string $token) {
  return view('auth.reset-password', ['token' => $token]);
})->middleware('guest')->name('password.reset');


Route::post('/reset-password', function (Request $request) {
  $request->validate([
    'token' => 'required',
    'email' => 'required|email',
    'password' => 'required|min:8|confirmed',
  ]);

  $status = Password::reset(
    $request->only('email', 'password', 'password_confirmation', 'token'),
    function (User $user, string $password) {
      $user->forceFill([
        'password' => Hash::make($password)
      ])->setRememberToken(Str::random(60));

      $user->save();

      event(new PasswordReset($user));
    }
  );

  return $status === Password::PASSWORD_RESET
    ? redirect()->route('login')->with('status', __($status))
    : back()->withErrors(['email' => [__($status)]]);
})->middleware('guest')->name('password.update');

The view
<x-layout1>
    <section class="form-section">
        <form method="POST" action='/reset-password' class="contact-form">
            @csrf
            @if (Session::has('message'))
                <div class="alert alert-success" role="alert">
                    {{ Session::get('message') }}
                </div>
            @endif
            <h2 class="form-h">RESET PASSWORD</h2>

            <div>
                <label for="email">Email</label>
                <input id="email" type="email" name="email" value="{{ old('email') }}" />

                @error('email')
                    <p style="color: red;font-size:1.6rem">{{ $message }}</p>
                @enderror
            </div>

            <div>
                <label for="password">Password</label>
                <input id="password" type="password" name="password" value="{{ old('password') }}" />

                @error('password')
                    <p style="color: red;font-size:1.6rem">{{ $message }}</p>
                @enderror
            </div>

            <div>
                <label for="password_confirmation">Confirm Password</label>
                <input id="password_confirmation" type="password" name="password_confirmation"
                    value="{{ old('password_confirmation') }}" />

                @error('password_confirmation')
                    <p style="color: red;font-size:1.6rem">{{ $message }}</p>
                @enderror
            </div>
            <button class="btn btn--form">Reset Password</button>


        </form>
    </section>
</x-layout1>