Nintendo Switch can only capture 30 seconds of gameplay using the built-in screen recorder. In order to capture more than 30 seconds, you need to use a capture card and record the video to a PC or MAC.
Depending on the quality of the captured video gameplay, you can choose to buy an inexpensive capture card like Vivitar Creator Series HDMI to USB video capture card, which is only $20 at Walmart, or something designed to capture gameplay for YouTube like the EVGA XR1 Lite, which is around $99 (refurbished version is anywhere between $50-$75). Plug your Switch’s HDMI output into the card’s input. Then insert capture card into your PC’s USB or USB-C port. Download and install OBS Studio free software. It’s available for PC, Mac and Linux computer OS systems.
Once you open OBS Studio, under category, select “Video Capture Device” and pick OBS USB device or the name of your capture card. You should also select Audio Capture Device and pick the same USB device to capture Switch’s gameplay audio. If you would like to add live commentary, pick another Audio Device and use your computer’s mic.