I don't regret switching to mac 2 years ago.
How long does Apple keep updating MacOS's for older hardware? That I'm aware, there are iPhone models that were discontinued (Vs. Windows 10 is just under 10 years old now - and I don't know what's the newest Windows 10 system that can't update to Window 11.)
I'm still on macOS Ventura (13.x), and am already seeing numerous apps with a minimum version of 14.x or 15.x.