Migrate user using social logins from one tenant to another

Hi everyone! My case is I need to migrate current user who are social logins(google & apple) from current tenant( tenant A) to a new one ( tenant B), for username and password user we would do a lazy migration and then bulk user import, we are still considering if we should raise a support ticket for password import or let the user to reset their password. However for social login users I am thinking to import all the users with their email address and give each user a randomly generated password. When a user tries to sign in via google or apple, it would be a brand new social sign up. We would then need to go link that new social connection to the imported user with the randomly generated password.

As for data in my legacy DB, people in the community are suggest to use Rules to pull the data from legacy DB and save it to user’s metadata, however Rules are pretty much deprecated, does Application do the same thing? or I should seek alternative solution? Thanks in advance!