In around 2002, I got my hands on an old 386 which I was planning to use for teaching myself things. I was able to breathe life into it using MicroLinux. Two superformatted 1.44" floppy disks and the thing booted. Basic kernel, 16 colour X display, C compiler and Editor.
I don't know if there are any other options for older machines other than stripped down Linux distros.
https://freedos.org/
Delicate Linux; but you need patience to compile some LibreSSL fork on top of BrSSL and then recompile Lynx, a newer Dillo, Git and so on.
Haiku OS:
https://www.haiku-os.org/
I mean - DOS or it's equivalents still exist and for older computers you will probably be able to find drivers.