This warning is issued because you try to install a debian package not from official repositories.
I checked the package, it contains an executable file named chrome-sandbox which is owned by root and has the suid-bit set, this means that this file will be executed with root-privileges. This is indeed a potential security risc due to full access to everything in your computer. In the end it is a question of trust, if you trust the publisher, install the software, you may need to download manually from discord.com and use the commandline to do so (see this question).
If you're unsure and want a safer approach, you can use a snap-package, snaps run under strict confinement which is much safer. The snap-package will also be updated automatically. The package is available in the snap-store, you can also use the terminal and install the snap with sudo snap install discord
Just for completeness, discord is also available as a flatpak.