For future proofing, I recommend a Nexus device and iphones (which are updated for up to 3 years). Motorola is also quick with their updates to the OS
When Moto phones were being released under the Motorola brand, many people bought them simply because they had a plain version of stock Android that received software updates quickly and always ran the latest version of the operating system. Now, the Moto brand is under Lenovo’s control, and slow updates to older phones have led to questions about the company’s commitment to timely updates.
It looks like Lenovo may not be issuing Google’s monthly security updates as quickly as before. The company finally released a security patch for the Moto X Pure a few days ago, after three months of not releasing any security updates. As such, the phone is still running with out-of-date software that’s missing more recent security patches. It’s unclear whether this trend toward slowing updates will cross over to Lenovo’s new Moto Z and Moto G4 smartphones.