It could be the software is outdated as Sethi described in his answer. But sometimes it is also a hardware thing. Some popular mobile games like GenshinImpact require ARMv8 instruction set but many devices have ARMv7, meaning, no matter how late of a version of Android you install, you will be unable to install the app. Meaning, the CPU would be too old to run it.
You will always want to look up the minimum requirements of the app and make sure your OS version as well as your hardware is up to spec. To use GenshinImpact as an example again, I look up the minimum specs on Google and find this list on a website.
So from this I’d know that if my hardware cannot support these specs, then it doesn’t matter if I upgrade to Android 9, 10, 11, or whatever, it still will be unable to install.