Specified Version Deployment error in meta xml files

While deploying Apex classes or Apex Triggers there might be below deployment error:

Error Message Example:
[ApexClass classes/ContractTriggerHandler.cls-meta.xml] -- Error: The specified Package Version number does not exist for that Package: SBQQ, 230.2

This error is caused because the Managed package version in the target environment is at a lower version (226.8.3) and the component's package version is at a higher version (230.2) which can be checked in the -meta.xml file of the Apex class or Apex Trigger.
Salesforce CPQ is at version 230.2 in the sandbox and version 226.8.3 in production.

Recommended Workaround:
Replacement Rules:
  1. Navigate to your Pipeline.
  2. Click on the Find and Replace Rule Editor button.
  3. Incorporate the following Regex expression and rules into your YML:
               majornumber-tag: '(?s)(\n\s*<majorNumber>___REPLACEVALUE___</majorNumber>)'
               minornumber-tag: '(?s)(\n\s*<minorNumber>___REPLACEVALUE___</minorNumber>)'
                   - xml
                 regex_name: majornumber-tag
                   - 230
                 replace_with: '<majorNumber>226</majorNumber>'
                   - xml
                 regex_name: minornumber-tag
                   - 2
                 replace_with: '<minorNumber>8</minorNumber>'

     NOTE: Make sure to check the indentation of the above YML snippet

     4. Save the YML.
     5. Deploy again.

How did we do?