You can install the CommunityCommons module and use the ‘Random Strong Password’ java action to create a random password for this user. Then you can use this password for the user and send this to the user by email.
Link to CommunityCommons: https://marketplace.mendix.com/link/component/170
Hope this helps!
You may want to look into the Forgot Password module as well, with it you can also send DeepLink e-mails for password resets etc. You can read the documentation here: Forgot Password | Mendix Documentation
For security, it is better to send a decrypted password link/reset link instead of sending the password at the email. You can use the logic at the Forgot password.