You can switch to a community ROM like Lineage when they stop. They’re A/B devices that support GSI images, you can install any GSI UI over the Sony firmware. In practice some of them support more features than others but they do work.
Also, I wouldn’t get my hopes up about all these promises about 7 years of updates. Google is notorious for going back on their word and Samsung only parrots them to look good
I honestly don’t see either of them delivering. Even if they wanted to, neither of them has the logistics for long term support of their devices and I doubt they’ve developed them overnight.