Ah yeah, isn't that the definition of something you don't directly depend on? Of course they "could just replace the OS", I can also just write a new web browser and use it to browse the web as it's supposedly a standard.
Except neither will support even a fraction of the originals' capabilities, at much worse performance and millions of incompatibilities at every corner.
The kernel, not the OS.
The OS is a mix of Java, Kotlin, JavaScript, NDK APIs and the standard ISO C and ISO C++ libraries.