Welcome to Shopify Community.
I was happy to do some research for you, and I found this third-party article on implementing a confirm password field in the customer registration page. Before attempting code changes, it's always a good idea to back up your theme and making sure you are comfortable with code changes.
If so, this article is a great reference point! I trust that helps, but let us know if you have further questions.