iPhones seem to retain their value after their first purchase, as they remain much more expensive than a comparable used Android phone.

If you don't want to pay a thousand dollars for a new iPhone XS and are hoping to buy a used iPhone for considerably less, you're probably out of luck. As a recent study revealed, the iPhone's resale value remains the highest in the smartphone market.
Data from BankMyCell, a website that specializes in buying used electronics, shows that a new iPhone X, which cost $999 when purchased brand new, was resold nine months later for $690. That means the iPhone's value has decreased by 30.93%.
Furthermore, the Galaxy S9, which was Samsung's flagship and sold for $720 brand new, could be purchased used nine months later for just $290. That means it lost almost 60%.
The analysis shows that iPhones typically depreciate the most when new models are about to be released. The data also shows that “Galaxy S phones are probably the worst investment,” as they lose value quickly after purchase.
The models with the lowest resale value and therefore the greatest depreciation by users are the Sony Xperia Z3 + (-57.78%), the iPhone 5S (-51.67%) and the iPhone 6 Plus (-51.00%).

