Rooting is more security compromising than it's worth. There are a small set of use cases I could see but for the most part do either or below.
If you have a Pixel you would want to run GrapheneOS for maximum security and privacy.
All other phones you would ADB remove bloatware, run PrivateDNS with NextDNS or an alternative, and turn off as much analytics/permission/features as possible for a functional phone.
Doing so gives you a unique IP so you lose out on a lot of privacy.