Even if sharing is not necessarily the first of human qualities, many of us like to share what is happening on our computer.
So, screenshots are fine; we all know how to do them. But when it comes to video capture, we quickly lose a lot of people.

Fortunately, there is the free software Kap, which works under macOS and allows you to capture your screen and then export these videos to MP4, Webm, APNG, or animated GIF. In short, it’s super practical, and Kap also supports extensions to make it easier, for example, to upload animated GIFs to Giphy.

Kap is very minimalist and will do the job for your screencasts.
You can download it here for macOS Intel/Silicon or install it with Brew like this:
brew install --cask kap