If you don’t buy no-name brand phones, you will get at least one major update. Even chinese brands such as xiaomi will provide updates. You can also install generic LineageOS image if your phone can be unlocked some way, official or not. It works on most devices.
But many smart TVs become useless very quick. When I was using 2015 phone in 2020, TV newer than that already loaded the lightweight Google version for unsupported browsers and vast majority sites/apps became unavailable. It used browser that was already 2 years old when it was released and never released an update to it. But when there was root vulnerability, they released a fix after long time of being basically unsupported.
Wonder if they will make EU-only variant of hardware and software which will be like totally different phone. They already did sideloading, USB-C and now this. What next?