Discord offers 5 different levels of verification you can put on your Discord server. These protections can help guard against spam accounts but can also inhibit legitimate users if the verification level is too tight.
The lowest level is no restrictions. This means anyone can join and start chatting immediately.
The next level is Low, and just requires users to have a verified email associated with their account. This is a basic level of security, but may be enough for some servers.
Next is Medium, which also requires users to be registered on Discord for longer than 5 minutes. This prevents a brand new spam account from immediately joining and spamming your server.
The next verification level is what can only be described as Table Flip. This, in addition to the previous requirements, requires a user to be a server member for longer than 10 minutes before they can start chatting.
Finally we have Double Table Flip. This requires users to have a verified phone associated with their Discord account. This is sure to keep out most spam bots, but can also exclude younger or less enfranchised server members.
Realistically, the best option is probably Medium. This keeps the worst offenders out while still allowing all people to chat.