Three years seems to be the standard amount of time that Google supports their phones. (A bit of web searching suggests Google may support newer phones for five years.)
I used to have a Nexus 5 phone, and when Google stopped sending updates, I rooted it and installed LineageOS on it, which gave it another couple of years life until Lineage stopped supporting the device.