I'm still getting system upgrades. Actually I wish they didn't upgrade to Android 10 because it made Syncthing much less useful as it can't access all the files anymore (but file managers can, even open source ones, so maybe it's a problem with Syncthing itself.)
Considering that I've got the phone in June 2019, I paid less than 100 Euro per year. If I had to buy a new phone to have Android 12 (and I don't understand why I should - I'd be fine with Android 8 or even 4 if I'd get security patches), 100 Euro per year is acceptable. The big problem with buying a new phone is that I'm not buying from Apple and I'm not going to find an Android one as small as the A40, which is already too big IMHO. I wish it was 3/4 or one inch shorter (2 or 2.5 cm.)