What do you do with your cell phone that still works cause you are someone that takes good care of their tech and the company doesn’t support it with security updates? Well, there’s a solution that involved Open Source. It used to be call CyanogenMod, it was reborn as LineageOS. Find your device on their wiki https://wiki.lineageos.org/devices/ and follow the Install recipe laid out after you have installed the Android adb tools to your appropriate Operating System. You can do this from any operating system platform. Windows, Mac, and Linux.