I receive spam from "Bubbleroom" contact without contact details after pressing three dots regularly. I am thinking how you can block messages from "no phone number" and such cases. Those messages are just advertisements.
Fig. 1 Example 1, Fig. 2 Example 2 of spam messages
It would be great to do it without 3rd party application. I know the thread Block SMS without number but it only offers 3rd party applications.
Phone: oneplus 3T
Android: 8.0 Oreo