If you're using the Discord sidebar panel, click the lock icon at the top middle of the panel, goto site settings and allow the microphone.

If you're loading Discord in a regular tab, click the lock icon at the left of the address field and do the same.

If you have more than one microphone connected to your system, see https://www.reddit.com/r/operabrowser/wiki/opera/known_issues/#wiki_opera_doesn.27t_honor_chromium.27s_default_microphone_and_camera_settings. The one you want to use has to to be the first microphone detected by Opera or Opera will ignore it.