If you only buy devices with LineageOS support, you can continue to get updates for a very long time. I would not want to be at the mercy of the manufacturer for the software.
With LineageOS you get OS updates (great!) but are still vulnerable to exploits that target binary-only firmware.