For those that really care about security there is GrapheneOS - that is a much more secure version of Android that supports all current Pixel devices, and even devices Google stopped supporting (Pixel 4/4XL).
Official releases of GrapheneOS, a security and privacy focused mobile OS with Android app compatibility.
grapheneos.org
I have a OnePlus 6 and 7T in my family's rotation and I installed LineageOS on those devices to keep them going once OP stopped providing updates for them (currently running LineageOS 20, based on Android 13).
This page is listing the official changes and downloads for LineageOS.
www.lineageoslog.com
Personally I'll continue using Pixels and upgrade every few years or so, and always ensure 4 things:
1. Latest Android version (device/manufacturer/ROM-dependent)
2. Latest Play System updates (Google-dependent; seems to be perpetually a month behind)
3. Latest Play Store updates (and updating the store itself via settings)
4. Use Chrome or a browser that maintains version parity with Chromium (example, Kiwi and Vivaldi keep up-to-date with Chromium versions while Samsung Internet is nearly 6 months behind Chromium versions). The latest Firefox with extension support is something I will be testing as well.