When I was setting up iPad and Raspberry Pi setup, I ran into an issue where yt-dlp, installed by sudo apt-get install yt-dlp
was giving me 403 Forbidden errors.
From [Solved] yt-dlp HTTP Error 403: Forbidden - Debian User Forums, I discovered how to install a working version:
add
deb http://deb.debian.org/debian bookworm-backports main contrib non-free-firmware
run
and it started working!