Navigate to User Settings > Notifications and toggle on the Enable Unread Message Badge option.
If you are an iOS user, go to Settings > Discord > Notifications and toggle on the Badges option.
But for an android user, go to Settings > Discord > Notifications and enable Show app icon badges.