My X's liftgate sensor failed, so it was stuck thinking the trunk was permanently open, the latch (which contains the sensor) and the cinch motor were still opening and closing properly.
If it's not under warranty replace only the part that failed. Both of these components don't wear out the same (like hours on a set of headlights or miles on a set of tires) and this isn't a safety critical component.
I requested service for it, and they gave me an estimate to replace both, I commented to them that it was only the latch's sensor that failed, they responded saying "usually when one fails the other fails soon after". To this I responded "Unless there's a reason why the new latch can't work with the old cinch motor, I'd prefer to only replace the latch", their response was "No problem".
The estimate went from almost $300 to $125 CDN.
If they told me there was a revision that made the new part incompatible with the old, fine... But otherwise I'd prefer not to waste money and make garbage throwing away stuff that still works.
FYI anyone looking to understand how to fix it should check out Tesla's online service guides - they're free... this is the article for the 2015-2021 Model X latch replacement
Model X Service Manual | Tesla