Laravel https://laravel.com/docs/9.x/validation#form-request-validation are special classes that extend the functionality of regular request classes, enabling https://laravel.com/docs/9.x/validation. Form requests also help to keep your controller actions a lot cleaner, because you can move all your validation logic to the form request class. Another benefit is that it allows you to filter requests before they reach your controller actions.
On the backend validation, you just need to use the https://laravel.com/docs/9.x/validation#rule-confirmed validation rule for your password field.
Bootstrap FrontEnd Code for Laravel Password and Confirm Password Validation