Modern PCs no longer have a text mode. It's just a pixel-based framebuffer and a bitmap font in firmware. Machines built before 2020 had an emulation layer that intercepted writes to a "text console" and had the firmware render pixels to the framebuffer. Before that, that same emulation resided in the firmware running on the display device. Real text console has been dead since something like early 1990s.
You can build Linux without ttys or serial ports. You can't disable VFS and a root fs (initramfs or noinitramfs, but either one is there), but Linux is surprisingly modular.