To generate mass credentials, navigate to contacts from App Launcher.
Select Contacts and click on “Mass Generate Portal Credentials”.
Note:
-> If you are unable to see the “Mass Generate Portal Credentials” list button, then navigate to Set up -> Object manager -> Contact object -> Search layout -> List view > Drag and drop Mass Generate Portal Credentials to selected button from available button.
-> You will get the “Mass Credentials” option only if no filter is applied and the “All Contacts” view is there.