As
ThrowAU said, off-the-reservation repo/supply-chains (including Homebrew on the Mac!) greatly increase a User's attack-vector.
It's not the 'distro' per-se, but how we use it. "linux" just allows us to see (and do) things with a granularity not usually allowed/available with major vendors.
I have faith that my trusty router running a seasoned version of Debian will ensure that no weirdos other than I can use it outside of the scope that I've defined. It also helps, I believe, that access is only allowed with a pre-configured SSH key.
Faith comes in many forms . . . wherein sits the trust when we drive a car at 100km/h down a busy two-way road?
😉