Desktop - Linux - Yes, likely. If not, here’s a flatpak
Desktop - Windows - Maybe it still runs in a compatibility mode?
Desktop - iMac - Here’s an emulator, good luck.
Mobile - PostMarketOS - Yes, likely. If not, here’s a flatpak
Mobile - Android - Maybe? Try it and see if you get permission denial
Mobile - iPhone - Fuck you, no.
Windows is pretty good with backwards compatibility, probably the best out of anything. I can run Visual Basic apps I wrote in the early 2000s on Windows 11 and they still run fine. Some old 32-bit games work fine too. You can even run some 16-bit Windows 3.0 apps on 32-bit Windows 10 if you manually install NTVDM through the Windows features (it was never ported to 64-bit though)
Linux is okay for backcompat but I’m not sure an app I compiled 20 years ago would still run today.