> yt-dlp is running the entire YouTube JS+DOM environment
IIRC they maintain a minimal execution environment that is able to run just the JS needed to pass a few checks but this breaks too often enough that they're planning to make Node.js or another JS interpreter a hard requirement (possibly already happened).
Pretty much - yt-dlp currently requires Deno to "solve" youtube challenges.
* https://deno.com/
* there may well be other JS interpreters that are accepted, can be used - but solving JS challenges is required for much, if not all, YT content.