Unfortunately only the original owner can purchase the extended warranty from Tesla, but there are other 3rd party options like X-Care. I can't vouch for them, but you can read other people's experience here.
It actually doesn’t seem to say that only the first owner can purchase the Tesla Extended Warranty. It does need to be purchased within 30 days/1000 mi of the original new car warranty end, and looks like it can’t be purchased on cars sold through third party dealers. So that does sound like X-Care is the option for a Carvana purchase.