How can I create a video of what's on the screen? (for Android 11)

Android 11 brings a feature - built-in screen recording. This lets you use easily-accessible controls within the phone to create a video of what's on your screen, similar to screenshots. You can even record the sound of your phone, or use the mic to narrate what you're doing.
Swipe down to access the quick settings from any screen, and then click the “Screen recorder” icon to create.
To further setup, go to the main menu -> “Settings” ->”Advanced features”->”Screen Recorder”