Method 1: Fast & Simple with ffmpeg (stream copy, but not frame-accurate)

YTID="C1CPZL71Fqc"
START="00:00:52"
LENGTH="24"
 
ffmpeg \
-i "$(yt-dlp -f bestvideo -g $YTID)" \
-i "$(yt-dlp -f bestaudio -g $YTID)" \
-ss $START -t $LENGTH \
-c:v copy -c:a aac output.mp4

WARNING

Cuts at nearest keyframe, so may skip a few seconds.

Method 2: Accurate Cut (re-encode with ffmpeg)

yt-dlp -f bestvideo+bestaudio -o "full.%(ext)s" $YTID
 
ffmpeg -ss $START -t $LENGTH \
-i full.mp4 \
-c:v libx264 -c:a aac accurate_clip.mp4