Take a look at the iPhone 6s and Samsung S6 Edge which were released in 2015, the iPhone 6s was released September 2015 and shipped with iOS 9, the Samsung S6 Edge was released March 2015 and shipped with Andriod 5.0.2.
The iPhone 6s currently runs on iOS 13.7 and received the latest update on 1st September 2020 and can run almost every app that the newest versions of iOS can run. Rumors are that the iPhone 6s will get iOS 14 when it is released late September or October. This makes it 5 years of getting official software support from Apple which is one of the major reasons people tend to stick with the iPhone for long.
Now let’s look at the Samsung S6 Edge, it was shipped with android 5.0.2 and currently runs on Android 7.0 it was officially released on August 22, 2016, and it’s the last official Firmware Support from Samsung and a few security patches which makes it less than 2 years of offical android support. it makes the samsung less likely for peopel to buy as a used phone.
People trust buying used iPhones but not used Androids because iPhones stay officially supported much longer than Android do. Because they run newer versions of iOS, they have more security features and are able to use many modern apps.