OBS Studio is a free and open source software for video recording and live streaming. You can watch the demo video to see if it suits your needs
sudo apt install obs-studio
obs studio
There are three common steps to recording a video: