rey
I can only speak for graphene OS as I am not informed on other OSs and how they work.
In graphene os there is a setting that allows you to limit which network types it uses. For example you can force it to only use 3g or 4g or 5g. Or you can tell it to only use 4g and down. This is a software feature.
It basically tells the OS not to connect to the tower if the signal is 5g.
One of the benefits not using 5g is battery drain. 5g uses more battery. From what i recall reading about 5g (which i am not 100% sure if its true), 5g can location track you with a single tower, no triangulation is needed.
Do know that graphene os only works on pixels. If you want a 4g only phone to use with graphene then you'd need to get a pixel 5 (i think?) or pixel 4 without 5g. But do know that the security updates for these phones have reached end of life. And i think graphene os will drop support for them soon (if not already. see their device support page for exact detail). This security support is important to prevent your phone from being hacked.
If you want to use other OS then its best to see that OS's device support page. Older phones will be 4g only. However they will naturally have "known" security holes. So a sophisticated attacker who is targeting you can very likely break into your phone.
Whether its a good idea to compromise security so you can avoid 5g hardware is a different question.
Maybe the ability to turn 5g off in software is good enough for you, maybe not. For you to decide.
Also know that you are location tracked accurately with 4g and 3g as well. You can also be location tracked using enabled bluetooth and wifi chip if the wifi does not have proper randomization. Graphene os offers pretty good randomization for the wifi chip, but not bluetooth as the hardware lacks the feature.