If you have an iOS phone, you can set it up to do this for you.
Do Not Disturb + allow calls only from contacts = whitelist of callers.
Do Not Disturb + allow calls only from contacts = whitelist of callers.
https://www.imore.com/how-receive-messages-specific-contacts...