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).