You can't install FOSS on most phones.
I think it's one of the last remnants of "don't be evil" at Google -- the Pixel devices are quite friendly toward alternative installs, much more so than most manufacturers.
And, now that Motorola and Graphene OS have announced a partnership, future Motorola devices may be a good option as well.
It is unfortunate that Rapsberry Pi 5 got that expensive because I wanted a Keyboard 500+ just for running some Foss Android Distribution (not a phone replacement)