After upgrading your Azure DevOps Server instance, you should also upgrade your ElasticSearch instance.
If the instance is running on the same server as Azure DevOps, it can be automatically updated using the Configure Search feature in the Azure DevOps Administration console.
In case you are running ElasticSearch on a different machine (what I would recommend) you need to copy the Search service package to the target server. You can find the link in the wizard that is used to Configure Search:
On the remote server extract the installer files and execute the following command:
\Configure-TFSSearch.ps1 --operation update
The installer should be able to find the existing ElasticSearch instance and update it for you.
More information: https://docs.microsoft.com/en-us/azure/devops/project/search/administration