Re: Apple provides a very long support lifecycle
It really depends, which Apple device you buy.
I was unlucky, I bought a first generation Intel iMac 24" in 2007. That stopped getting OS X upgrades with Lion (2011) and the last security update was in October 2012 - almost exactly 5 years. (The problem was that the first Intel Macs used a 64-bit processor, but only 32-bit UEFI, after a couple of years, Apple dropped support for 32-bit UEFI and went all 64-bit, leaving those early adopter hanging in the wind.)
One of the reasons I bought the iMac was Mac using friends telling me that Apple supported their devices for longer than Microsoft did. I have used Macs on and off at work since 1987, but the Intel iMac 24" was the first one I actually owned. They had always been too expensive, but with a lecturer's discount, the first Intel iMacs were actually competitively priced, compared to an equivalent Windows PC + 24" display at the time. When I came to replace it, the cost of a 24" display had sunk by 70%, the price of the iMac had increased...
The irony is, the BootCamp site was using Windows 7, which would have continued support until 2020, if the logic board hadn't crapped its pants in 2016.
That put me off buying another Mac for a long time - although I did get a Mac mini M1 at the end of last year... We shall see.
At the moment, I have a 2010 Sony Vaio laptop, running Mint, a 2017 Ryzen 1700 desktop running SUSE, a 2016 HP Spectre x360 running Windows 10, a handful of Raspis and an M1 Mac mini.