The FairPhone comes with stock Android, but you can easily unlock the bootloader and install a different ROM. Some that I know are available for the FairPhone 4 are LineageOS, CalyxOS, iodéOS and /e/OS. With all of these you can achieve a certain level of degoogling and privacy.
Many people will recommend you GrapheneOS, which is unfortunately only available on Google Pixel devices.
As far as I know, this OS is no longer available in the newer models FairPhone 4 and FairPhone 5. However there are other degoogled options for these models, off the top of my head: LineageOS, CalyxOS, iodéOS and /e/OS.
Except you get the firmware updates for the included Qualcomm SOC for way over the regular 3 years, you get very cheap parts for ALL components, full component and electric schematics ( Louis Rossman recently made a video about it).
You don't get much of that at once with a drop shipped phone or big brands either.
With shift flashing and rooting does not void warranty. With fairphone at least rooting does, don`t know about flashing tho. There is a community for degoogleing for sure tho.
Written from my fairphone after the Wifi chip on my shift died after 2.5 Years and it was to expensive to fix.
Cannot see modules for sale in the shop which is rather strange for a modular phone. There is no details of their sourcing concerning rare earth parts . They push the recycling part real high when their documentation shows 450 Kg/year of effective recycling, where does the rest of their current devices come from? Finally They push consumerism quite far in their shop with their bundle buy our current phone and you get a free upgrade towards the next one we launch.
And what about the bikes they also make and sell? Making one type of good product in such a niche market should be focusing enough not to be distracted in making other household products with vastly different supply chains, especially when you aren't a multi-billion conglomerate.
I bought it new and immediately flashed CalyxOS after taking it out of the box, using the Calyx Institute's instructions: it was easy and it went smoothly.
Don't listen to some of the GrapheneOS fanbois: you CAN relock the bootloader after CalyxOS is installed on the Fairphone. In fact, it's recommended.
As for buying a used Pixel phone and arguing that's a better use of the Earth's resources than landfilling it and buying a new Fairphone, that is a valid argument depending on how you look at things.
However, what isn't a valid argument is saying buying a used Pixel isn't giving money to Google because it's used: if someone bought a Pixel and gave their money to Google, they got some of that money back when the second owner bought the Pixel used for cheaper - meaning the second owner took on part of the original purchase, meaning the second owner gave their money to Google in lieu of the first owner.
I'm sorry but the only Pixel phone you can buy that won't indirectly give money to Google is a stolen Pixel, and I ain't no thief. I refuse to give money to Google, and I refuse to support Google in any capacity, therefore I refuse to own a Pixel phone.
Refusing to patronize Google by not buying a Pixel phone - 1st of 2nd hand - and refusing to be part of the Pixel ecosystem is also a means to fight for your rights to privacy, because anything that hurts Google is good for privacy.