One of the reasons /e/OS (and LineageOS, on which it is based) exists, is to prolong the useful life of mobile devices beyond the relatively short periods that manufacturers provide software updates. So security fixes, and other changes to the open source parts of Android are made available for a long time after manufacturer support ends.
For example, I own and use Sony Xperia devices dating from 2014 (Z3 and Z3 Compact), 2015 (Z5 Compact) and 2017 (XZ1 Compact). These devices receive regular updates from LineageOS (officially for Z3/Z3C, unofficially for the others), most of which also find their way into /e/OS. Fully functional Android 11 / R LineageOS builds are available for all these devices (and /e/OS builds fro Z3 / Z3C), and Android 12 LineageOS builds are currently being developed and tested. They are all great phones and do everything I want/need from a phone.
If you choose a device officially supported by LineageOS, then you can be pretty certain that updates will be available for a long time. I would recommend either a Sony device, or a Google/ Pixel device. Both companies are supportive of open source and custom ROM developers, whereas companies like Samsung and Xiaomi, seem to make life difficult and discourage custom ROM development.