Hello Priya Sopan,
First check the Mendix Marketplace - There're multiple modules available for 2FA.
You also can make your own logic.
you can make an OTP or a TOTP 2FA.
After login you can generate OTP and send it to customer through Mail or SMS.
Hope my answer helps, reach me out for any queries.
You might want to check out the marketplace, there are multiple ones like this one for instance: https://marketplace.mendix.com/link/component/116892
Regards,
Ronald