I think you are trying to over-complicate this. Your question is of course quite broad and there are different solutions.
Microcontrollers, MCUs, tend to have some form of non volatile storage, today that means flash. For each brand/family/product there is some way to program that flash using the pins of the part in some way. The machine code, the program/instructions as well as data can be programmed into this flash. Then on a normal boot, the processor in the mcu will start executing those instructions and run the application.
Normal processors, or let's say non-mcus, typically do not have on chip non-volatile storage. There will normally be some form of off chip non-volatile storage be it a flash, an SD card interface, etc. This storage will contain the machine code, etc, that boots the chip and gets it going.
Some processors have on chip sram and have some interface that one may be able to come in through an interface on the chip to halt the processor, load that memory with instructions and start execution of those instructions. Some may use this sram in a way that logic on reset/boot will copy instructions from an sd card to this sram, then start the processor executing from that sram.
There is no one way that every processor boots.
Once running an operating system for example, a program from a hard disk can be loaded into ram by the operating system, and then a jump to that code starts it running.
cache is just cache, it is in between the processor and the main memory (usually dram for Linux/Windows/MacOS type systems). You generally have an MMU, memory management unit, that is configured by software (kernel/operating system) to describe the system and define which parts of the address space are to be cached and in what way (instruction, data, etc). Then when memory transactions happen from the processor, and go through the mmu, that will mark the transaction as cacheable or not, then the cache, if configured and enabled, will....cache that transaction...You do not fill the cache directly, the cache is basically automatic and based on transactions going by, generally not predictable.
There have been processor chip designs, that for various reasons, have an on chip rom or flash, that is programmed by the chip manufacturer. This can be used to drive microcode for a CISC design, this can be a factory bootloader for an MCU, or other reasons.
Memory, DRAM, is dynamic D, not only do you have to work for it to retain any information, it is volatile, when the power goes off, or refreshes stop, it loses its information. You definitely do not preprogram this at some factory.
Same goes for SRAM.
Except for some very rare cases, the logic is designed such that it boots off of some non-volatile storage (these days that is some form of flash device on chip or off). That non-volatile storage is generally programmed by the PRODUCT vendor (not chip vendor), computer motherboard, TV set top box, cell phone, etc. That code generally then looks for additional software possibly on another non-volatile storage of some sort (hard disk, SSD, etc). And then of course that software may be an operating system, that can then run other various applications (web browser, mail program, games, etc). You often have one solution to get the chip booted, dram initialized, etc, to prepare the system to load and run an operating system off of some media, not uncommon to be different from the boot loader. Then the operating system loads and runs applications, usually from the same media that held the operating system.
The car is generic. The user has to insert a key and turn it on and start it. Then the user has to drive it somewhere. Multiple steps for the thing to do its job. The design for the car is such that the driver is not pre-built into the car, but instead a generic interface such that countless different operators can start and drive the car.
Same with a processor/system, reset starts the bootloader, the bootloader loads the operating system, the operating system loads the applications. The software is stored in one or more forms of non volatile storage and loaded through generic interfaces designed into the hardware (chip or board).
RAM, including layers of caches, are simply volatile storage devices on layers of buses according to some design. Professor writes formulas on the whiteboard, from their brain, student copies those formulas onto paper, longer term storage. Professor runs out of white board and starts to erase some of the info to make room for more. The whiteboard is just a cache between the professor and the students notebook. There is no reason for the whiteboard to be pre-loaded with a fraction of one lecture when the building is constructed. It is designed to be used and reused runtime.