I have a fairphone 4. They openly support open-source so it may be a good match for you:
You can download and compile the version of the Linux kernel used in the Fairphone 4 here: Fairphone 4 Kernel Source Code — FAIRPHONE open source documentation
The fairphone 4 has no bloatware like on samsung (you do have the standard google apps pre-installed though), and they offer 5 years of warranty, while promising 6 years of updates.
If you hate google, you can buy an /e/ OS version sold by murena, or install it on your fairphone yourself.
If you only want to uninstall the default google apps, you can remove those easily with this software: universal-android-debloater
I like their eco-friendly / fairtrade / repairability (10/10 on ifixit) approach, the screen is big enough to be able to edit tiddlywikis without too much issues, and it’s powerful enough for most tasks. The screen is very good but not the best (you probably want an amoled if this is very important for you). It has no audio-jack , so I bought the “Apple USB‑C to mini‑jack 3.5 mm” for about 8 euros. They offers Bluetooth earphones for free with your fairphone 4 last time I checked, and they also sell their own usb c to jack adaptor but I couldnt get either of those (not available when I bought mine).
What I really love with this device is the easy to replace parts, especially the battery !