The premise of the question is based on a big misunderstanding about how computers work.
Compile a simple "hello world" executable. Disassemble it, or let the Godbolt Compiler Explorer do that for you.
Does it contain a copy of the library implementation of puts
/ printf
? No. It's dynamically linked to libc so every program doesn't need its own copy of every library function it uses.
Does it contain graphics drivers that actually draw the text in video memory? No, of course not, and that wouldn't even be possible for a program that runs in a multi-tasking OS with memory protection: The OS can't let processes access the hardware directly; they'd be able to crash the computer or draw on each other's windows.
Instead, processes make system calls to interact with things outside of themselves.
Leaving all that aside, there are multiple architectures that don't understand each other's machine code. So even within the same OS, an x86 binary won't run natively on an ARM CPU.