Perhaps there are small differences in the mysql versions and perhaps Nextcloud does not really uses new features. But in future you would need current versions of the operation system and/or database.
I know a lot of people with old software (e.g. Ubuntu 16.04 LTS or 18.04 LTS ) which works fine over years with very old nextcloud versions. But after years the admins must upgrade and then there are real problems.
I would tend to say: Upgrade your MySQL Server, but since the Nextcloud Jail on TrueNAS is more like an appliance than a manual installation , I don’t konw if it’s supported to upgrade induvidual components of it manually.
Have you checked out the TrueNAS forum already? Chnances that someone can help you with that specific problem are probably higher over there …