Firstly, click on the Discord button:

Sign into Discord (if you're not already) and authorise the forum to use Discord as an identity provider:

Log in to the forum using your existing credentials (or register if you haven't already done so):

From now on you can use Discord to log in.
You'll see that it's link successfully in the UCP > Profile > Manage external account associations
It's important to note that even after linking your account with Discord, you can still log in using your username and password if you wish.