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:
             regex_lib:
               majornumber-tag: '(?s)(\n\s*<majorNumber>___REPLACEVALUE___</majorNumber>)'
               minornumber-tag: '(?s)(\n\s*<minorNumber>___REPLACEVALUE___</minorNumber>)'
             rules:
               change_major_number_version:
                 branches:
                 extensions:
                   - xml
                 regex_name: majornumber-tag
                 replace_values:
                   - 230
                 replace_with: '<majorNumber>226</majorNumber>'
               change_minor_number_version:
                 branches:
                 extensions:
                   - xml
                 regex_name: minornumber-tag
                 replace_values:
                   - 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?