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.