That’s the wrong answer and always has been. You don’t need to store your entire video in RAM to edit it, and never have. I’m sure you can find many descriptions of how it actually works without having to guess but 4K video processing and editing has been done for decades and decades now on computers with barely Apple Watch grade CPUs. George Lucas was using an EditDroid to edit 35mm film through the generation of edit lists on a computer controlling a Laserdisc player. The computer had very limited RAM, IIRC 16MB which was extravagant at the time.
The editing process for the average YouTube ‘content creator’ may consist of previewing a bunch of effects and transitions and animated floating text in real time until they think they’ve hit the right viral load but in practice professional editing is still done by the composition of edit lists from preview material.