Or, you can buy a Librem 5 (although it’s quite expensive).
https://puri.sm/products/librem-5/#tech-specs
https://tuxphones.com/purism-librem-5-vs-pine64-pinephone-li...
(I'm not suggesting pinephone - the librem guys seem to give a lot more back to the community.)
Pinephone was a good step in the right direction but I am not a fan of either of the cameras on it or Allwinner CPUs. Librem 5 is using an NXP i.MX 8M with better cameras but the price point is a tough sell.