I'd get something that has LineageOS support [1] or, even better CopperheadOS [2].
Copperhead OS is restricted to new Nexus and Pixel devices only, sadly.
Both options are great when paired with F-Droid [3].
I'm eagerly awaiting how postmarketOS [4] develops. Still in its infancy, though. It's basically a Linux distro on top of an Android kernel, so they also need to grow an ecosystem.
If you want something with a Linux userland and quite polished, try Jolla on a Sony Xperia X [5]. Still not fully open, so I prefer the above options.