Why you want to send the user an OTP via email to setup TOTP via QR code?
You can just add the required action to configure TOTP to the user, so that a user is forced to setup TOTP.
You can make the required action a default for new users.
If you don‘t want to set it manually (or automated through API) for existing users, you can implement a derived version of the existing action as a custom required action which recognizes automatically if a user doesn‘t have setup TOTP and that the required action should be activated for this user.
Please note that we are trying to add that additional step to make sure even though the user’s password is compromised the attackers can’t register for OTP/MFA.
Alternatively, we are thinking to send the seed details (QR Code or some link to import the seed to Authenticator app) to the user’s email.
Is there any way to send the QR Code to the User’s email instead of showing it on the KC screen?