Game consoles worked a lot like this until around the PS3 era, where the disc/cartridge the game came on was shipping binaries for everything including all the hardware support.

This led to some hilarious implementation shenanigans for the Wii as a transitional console, where the Home button pause screen is not in fact a task switch to some underlying console OS but rather a piece of the SDK that is separately-delivered from each individual game.

ref. https://www.copetti.org/writings/consoles/wii/