You use Do Not Disturb for that feature, not the mute switch.
- Tap Settings
- Tap Focus
- Tap on any Focus settings that you will never use and remove them (you can add them back later if you change your mind, and even create new, custom ones)
- Tap Do Not Disturb
- Tap People
- Tap Allow Notifications From
- If anyone is listed who should not call you when DND is on delete them; if you don’t want any calls from anyone, any time, delete all people
- Tap the dropdown next to Allow Calls From and choose Allowed People Only
- Optionally, tap on Apps, then Allow Notifications From and don’t add any apps.
- Optionally, turn on Allow Repeated calls to allow calls from people you didn’t include in the Allowed list.
All of the above is a one-time setup. After that, turn DND on or off with a quick tap on the Control Center DND button. You can optionally set one or more schedules by going to:
Settings/Focus/Do Not Disturb/Set a Schedule.