This, of course, doesn't work reliably. My wife's text from 12:30 am didn't reach me until 6:30 because she was blocked. She's in my contacts and all contacts are allowed. Was a good idea, though.
What is Blocking Mode on Samsung Galaxy devices? in a simple word, when this mode is enabled, notifications for selected features will be disabled. You will only receive notifications of incoming calls from people on your allowed list.
To enable and use this feature:
1. Go to "Setting" App
2. Tap on "Blocking Mode" and make sure it is enabled
3. On the "Feature" section, choose to disable incoming calls, notifications, alarm and timer
4. on the "Set Time" section, choose the time of enabling blocking mode
5. on the "Allowed contacts" section, choose the allowed contacts list.