You didn't try the by far most popular option - OBS Studio.
To get the best audio results:
- add proper source for your input device, e.g. microphone
- add filters to the created source to process the audio on the fly, e.g. remove noise, add some gain and limit max dB treshold. There are lots of videos on e.g. YouTube explaining how to properly set up filters.
- add any other sources for whatever you want to record, specific windows are recommended. If you need other sound from e.g. the system, using Application Audio Capture source is recoomended for the best control.
A simple one is simplescreenrecorder which can be found in the 18.04 repo. Install it with
sudo apt install simplescreenrecorder
start it > Continue > choose size of screen to record > tick the box for audio. For Backend choose pulseaudio. For source choose built in audio analogue stereo which would record the mic instead of the internal audio > choose save location and the default codec parameters should be ok

There is an application in the Official Ubuntu Software Repository callled Kazam, which works great. It will record internal sound, external sound, and the screen. It has pretty good video quality, as well. It can be installed with:
$ sudo apt-get install kazam

If your recording doesn't have microphone sound, make sure to check File > Preferences and try another "Microphone" selection, it may be picking up an unconnected headphone:

The keyboard shortcuts are:
- Super + Ctrl + R: start recording
- Super + Ctrl + F: finish recording, see also: Kazaam how to stop recording?
How come the built-in Ubuntu screen recorder doesn't record sound? Any Linux developers here, will you please fix this for when 26.04 LTS comes out?
I need a screen recorder for Ubuntu
Are there any decent and actively maintained screen recording tools available for Ubuntu on Wayland?
What's the simplest/best screen recorder you'd recommend for recording a region of your screen?
Does Ubuntu have a built-in screen recorder?
Where are screen recordings saved on Ubuntu?
SimpleScreenRecorder (source code) did the trick for me when recording online playing videos. It has an (experimental) OpenGL feature. On Ubuntu:
sudo apt update
sudo apt install simplescreenrecorder
With the OpenGL feature you can select to record a specific application window. So you can even keep working while recording in the background. Don't play any music though, because the audios will mix together (unless, of course, you are a DJ ;) )
Maybe RecordMyDesktop could work for you? It has the ability to record your screen and audio, but I'm not sure if it supports games.
You can install it with
sudo apt-get install recordmydesktop
If you want a GUI, you need to also install one of the packages gtk-recordmydesktop (GTK) or recorditnow (Qt)
It is discontinued but it does work as expected.
It's awesome to have a built-in screen recorder but it doesn't record sound so because of this I literally can't use it. Linux developers will you please fix this? I mean you can fix that right? I hope you have this fixed by the time Ubuntu 26.04 LTS comes out.
gtk-recordmydesktop 
Adds an easy to use graphical icon on the GNOME toolbar to make a pleasure use and configure the audio and video capture and screencast application recordMyDesktop.

As mentioned at 20.04: Can't install gtk-recordmydesktop and on the package search, the package is not available on the main repository anymore, and sudo apt install gtk-recordmydesktop fails. I'm not sure why the http://apt.ubuntu.com/p/gtk-recordmydesktop link seems to work, maybe it installs an older version. But this indicates that the software is not being actively supported.
recordmydesktop
This is the non-GUI backend of recordmydesktop, and it is still available in 20.04:
sudo apt install recordmydesktop
recordmydesktop --on-the-fly-encoding
This will record until you stop the program on the terminal e.g. with Ctrl + C.
--on-the-fly-encoding encodes the output immediately; without it you need to wait for a possibly long time at the end for the encoding to be done. I haven't seen any significant downsides to that option yet, likely it will just take a bit more of CPU resources, but it is generally worth it.
It should be able to do everything that gtk-recordmydesktop does, but it is a bit harder to learn as you have to deal with the command lines.
You can set a stop recording shortcut e.g. with:
recordmydesktop --stop-shortcut=Control+s
You can select to record a single window as shown at: How can I get the value of Window ID?
recordmydesktop --windowid `xwininfo | grep 'id: 0x' | grep -Eo '0x[a-z0-9]+'`
This will allow you to first select the window with a mouse click, and it starts recording after you click.
How to record sound output with it: https://unix.stackexchange.com/questions/3490/how-can-i-record-the-sound-output-with-gtk-recordmydesktop
xvidcap (no longer maintained, package is no longer available)
A screen capture enabling you to capture videos off your X-Window desktop for illustration or documentation purposes. It is intended to be a standards-based alternative to tools like Lotus ScreenCam.
Video can be saved in MPEG or AVI files format.
Kazam
It's a good application for this purpose:
Home, install, or simply sudo apt install kazam
It gives you a delay before recording. Recording is done in HD and the output is in .mkv format which is accepted for YouTube so there is no need to convert and re-render.
There are some useful keyboard shortcuts too:
To start the recording: Super + Ctrl + R
To pause the recording: Super + Ctrl + P
To stop the recording: Super + Ctrl + F
To show/hide main window: Super + Ctrl + W
On Ubuntu 20.04 I met this bug with it where the video is not captured/or is all black: https://github.com/hzbd/kazam/issues/9 even though recordmydesktop video capture worked on the same machine.