By default, only people you follow can send you direct messages on Twitter. This is just one of the ways Twitter tries to keep harassment to a minimum. If you want your DMs to be open to anyone, however, you’ve got to enable a setting.
The process is similar on all platforms. Click or tap on your profile icon, then select Settings and Privacy.
Next, select Privacy and Safety.
Finally, under Privacy, check Receive Direct Messages from Anyone.
Now anyone with a Twitter account will be able to send you Direct Messages. To turn off the feature, just uncheck the Receive Direct Messages from Anyone box.