The Raspberry Pi Compute Module 4 comes in two main flavors: one with built-in eMMC storage, and one without it. If you opt for a Compute Module 4 with built-in eMMC storage, and you want to write a new OS image to the Compute Module, or manually edit files on the boot volume, you can do that just the same as you would a microSD card—but you need to first make the eMMC storage mountable on another computer.
This blog post shows how to mount the eMMC storage on another computer (in my case a Mac, but the process is very similar on Linux), and then how to flash a new OS image to it.
In addition to the tutorial below, I published a video version of this post covering installation and usage of
rpiboot for flashing the eMMC on Windows, Ubuntu, Raspberry Pi OS, or macOS: