The messages app on the OnePlus smartphone comes with automatic spam protection that can be (de)activated at any time.

The anti-spam protection detects spam messages and sends rough details or information to Google without sending the phone number or the content of the message.

Android 10 | OxygenOS 10.0
Step 1:  Open the  Messages app
Step 2:  Open the  menu
Step 3:  Open the  Settings
Step 4:  Tap on  General
Step 5:  Tap on  Spam protection
Step 6:  Enable or disable  Spam protection
  1. Open the Messages app
  2. Open the menu
  3. Open the Settings
  4. Tap on General
  5. Tap on Spam protection
  6. Enable or disable Spam protection

OnePlus Instructions