Hi Neha,
Have you checked this module/piece of documentation: https://docs.mendix.com/appstore/modules/forgot-password/
It might help you achieve what you are looking for.
Hi Neha Makhija
step 1 : get user input and after check user input login id with retrieve database login id like this
Step 2 : check account already exist ?
step 3 : if account is exist after change password for login id