If you want to, Mastodon lets you block DMs from people you don't follow:

1. Log in on your Mastodon server's website
2. Click "๐Ÿ”” Notifications" (on mobile it's just a ๐Ÿ”” icon at the bottom of the screen)
3. Click "show settings" double arrow icon in top right corner
4. Set "Unsolicited private mentions" to "Ignore"

Bear in mind that no one will know you've done this, so some people mention they've done this on their profile to avoid any confusion (but this is optional).

0
3
0

If you have a fediverse account, you can quote this note from your own instance. Search https://social.growyourown.services/users/FediTips/statuses/116177780175114996 on your instance and quote it. (Note that quoting is not supported in Mastodon.)