While Apple
might not officially support this M2 MBA with a new version of macOS after 3 years, that doesn't mean it will stop working or it won't be supported with security and bug updates which is most important.
I have a 2015 MBA that came with Yosemite (OS X 10.10). While it cannot officially be updated beyond macOS 12 Monterey, Apple still supported it last year. The last Monterey update was
12.7.6 on July 29, 2024.
If you don't need the latest macOS, then people will be fine with this MBA for well beyond the next 3 years.