
Use the Security link beside the Apex Class name in Setup to give access to multiple Profiles at the same time in Salesforce. Check the following steps:
1. Go to Apex Classes.

2. Click Security for the apex class to which access should be given.

3. Select the profiles and click Save button.