While it is normal to think in terms of blocking all call & message alerts during certain busy periods of the day, it is not always possible or practical to do so. In such cases, you can set your iPhone to ring only when certain selected Contacts call your device; while preventing everyone else from ringing your device.
This can be achieved by enabling Emergency Bypass mode for these selected Contacts and also by making use of Focus Mode Settings as available on iPhone.
Allow iPhone to Ring for Selected Contacts in Silent Mode
The easiest way to set iPhone to ring only when certain selected Contacts call your device is by adding these selected Contacts to Emergency Bypass Mode, which grants them with the permission to ring your device; even when it is placed in Silent and Focus Mode.
The other ways of doing this is by adding these selected Contacts to Allowed list in “Do Not Disturb’ mode and by adding these Contacts to Favourites List and allowing Favourites to call your device in Do Not Disturb mode.
1. Allow iPhone to Ring for Selected Contacts Using Emergency Bypass Mode
An easy way to make iPhone ring; only when certain Contacts call your device is by enabling the Emergency Bypass Mode for these selected Contacts.
1. Open the Contacts App on your iPhone > select the Contact that you want to add to Emergency bypass mode.
2. On Contact’s Detail screen, tap on the Edit option located at top-right corner.

3. On the next screen, scroll down and tap on Ringtone.

4. On the Ringtone screen, move the toggle next to Emergency Bypass to ON position and tap on Done.

5. After this, go to Settings > Focus > Do Not Disturb > select your current DND Schedule.

6. On the next screen, move the toggle next to Schedule to ON position.

Now, only these important Contacts that have Emergency bypass option will be able to ring your device.
2. Set iPhone to Ring for Selected Contacts Do Not Disturb Mode
Another way of making iPhone Ring; only when certain selected Contacts call your device is by adding these Contacts to “Allowed” list in “Do Not Disturb” mode.
1. Go to Settings > Focus > Do Not Disturb > select the People tab, located under “Allowed Notifications” section.

2. On the next screen, tap on +Add people option and this will take you to your Contacts List.

3. On the Contacts List, select the Contacts that you want to add to Allowed List and tap on Done.

4. After this, tap on Allow Calls From tab and select Allowed People Only option.

After this, only the people in Allowed list will be able to ring your device, as long your iPhone remains in DND Mode.
3. Set iPhone to Ring for Selected Contacts Using Favorites List
Yet another way of making iPhone ring for selected Contacts is by making these Contacts as Favorites in the Contacts App.
1. Open Contacts App > select the Contact that you want to mark as your Favourite Contact.
2. On the Contacts “Info” screen, select Add to Favourites option.

3. On the menu that appears, select the Call option.

4. On the next menu, select the Phone Number of this Contact.
5. After this go to Settings > Focus > Do Not Disturb > select the People tab.

6. On the next screen, scroll down and tap on Allow Calls From and select the Favorites option.

After this, only these Favorite Contacts will be allowed to ring your device, whenever you decide to place your iPhone in “Do Not Disturb” mode.