Tesla can replace a Model S/X 60, 70, 75, or 85 kWh battery with a 90 kWh battery. The 100 kWh pack is incompatible and uses different connectors and fluid fittings. Due to the extra weight of the 100 kWh pack, the suspension was changed and the airbags are calibrated for these changes. (Feb-2023)
Changing the pack size requires more work than simply swapping the battery. In addition, software changes are made, and some required changes are not available even to those with access to Tesla’s Toolbox 3.
Tesla is charging around $20-22K for a new 90 kWh pack and installation labor. Other sizes are not available for 60-90 kWh vehicles. Tesla may also have a refurbished pack available at a lower price.
Two companies that offer trusted upgrades and battery replacements are wk056 and Recell. Both offer warranties on their work as well.
There are third-party companies that will repair a damaged pack. Typical costs are in the $5K range. Gruber Motor Company is one place that has a pack repair service.