Not anymore. Now Apple will drop MacOS support for their computers way earlier. I tried to update my barely used MacBook from 2012/2013 somewhere last year and learned that it was dropped quite some time ago - so if I would have kept it on the newest release (there were serious bugs, I was hesitant), I think it would have got around 8 years max, if memory serves me right. No security updates at all anymore, not possible to download older release than the newest. I did not expect that.
And I had to upgrade SSD and RAM 2 and 4 years after buying, it became unusable for work (granted, it was not spec'ed out originally).
MacBook Pros and Airs from 2012 are supported by Catalina, and that is still getting security releases. It does require 4GB of RAM though if you didn’t have that to start with.
If you bought your MacBook until MID 2012, you're out of luck though.
And 10 years old would be early 2011, and those are also not supported.
Mojave has the same requirements basically, that leaves High Sierra, and High Sierra had a few months of support left (ended Dec 2020), so I just aborted.
And I had to upgrade SSD and RAM 2 and 4 years after buying, it became unusable for work (granted, it was not spec'ed out originally).