Numbers released by Statista show that 25% of Android devices currently in use are running a massively outdated version of the OS from late 2014.
On the other hand, Apple's iOS has only 7% of users on pre-2016 versions of the operating system. Google has 17% that are older than 2014, which is a huge number of very out-of-date phones and tablets.
Google isn't to blame for the specific problem of out-of-date Android installs, the device manufacturers are.
According to Statista's data, 93 percent of iOS devices run some version of iOS 11 (originally released in September 2017) or iOS 10 (September 2016). Android's latest version Oreo on the other hand is installed on just 1 percent of all active devices, while 4 in 10 devices run on a system that is more than three years old. As a consequence iOS app developers find a rather unified playing field while Android developers have to work with a deeply fragmented system.
Companies like Samsung, Sony and LG do continually push security updates but your brand new Samsung Galaxy S9 may only get an update to Android P and never see Android Q.