Before we dive into the commands, there's one CRUCIAL tool you need to have in your arsenal:
FFmpeg. Seriously, if you want to download high-quality video from YouTube, you NEED FFmpeg. Here's why: for anything above 720p, YouTube serves the video & audio as separate files.
can download both of these files, but it needs FFmpeg to merge them into a single, high-quality video file. Without FFmpeg, you'll be stuck with 720p at best, which is fine, but not the glorious 4K we're after.
So, before you do anything else, make sure you have FFmpeg installed on your system. A quick Google search for "install FFmpeg on [your operating system]" will get you sorted.