Apple's support window advantage long predates their services initiative.
Every flagship iPhone since the iPhone 4s in 2011 has gotten at least five years of OS and security updates.
If you count years where you only get a security update, but not an OS update the way the Android ecosystem does, they have devices that have gotten eight years of support.