I recommend Element; it’s very similar to Discord and has basically the same features but it’s privacy-focused and both servers and DMs can both be encrypted so only the actual users of those rooms can read the messages.
This means unlike most popular chat apps, including and especially Discord, Element doesn’t sell your conversations or tracking data to advertisers, because the company literally doesn’t have access to that data in the first place.
I’ve used it for years and I think it’s a natural fit for Discord users.