Video and GIF recording, while doable without Photo Studio, are greatly enhanced by it. If you aren't familiar with Photo Studio, we highly recommend reading the linked article first.
To record an individual device, open the 3-dot menu in the device header and select Record Video or Record GIF—this works in both normal mode and Photo Studio.
Even if you are working in normal mode, starting a recording will (temporarily) change the background and use the options set in Photo Studio. This is another reason to read up on Photo Studio first.
To record multiple devices, first open Photo Studio (hotkey p).
In the toolbar, use the Record a GIF or Record a Video icon (shortcut Shift+R) to start recording.
Once you finish recording the video, you can exit the Photo Studio while your video or GIF is processing, which can take a while depending on the length of the recording and your computer's speed.