Are you receiving this error pre-upgrade to the latest Invision Community? If so, there may be something there that is PHP 8 incompatible or plugin issue. You can check the System Log in ACP -> Support.
With that said, as you're so far out of date, you will want to do a manual upgrade:
https://invisioncommunity.com/4guides/advanced-options/server-management/install-and-upgrade-r259/#manualupgrade