It must be detergent or washers are easier on clothes. Growing up, all my clothes eventually became the same dirty pink color when I’d wash colors together. These days I just dump everything in and toss in some laundry soap, maybe some softener if we have it around, and I still have clothes that are 20 years old and in regular rotation. Colorful as always.
Do you wash in hot or cold water?

This is the right question. I always use cold water unless something is soiled. Or maybe towels if there’s nothing else in there.

I think detergents have gotten good enough to work just as well in cold water, and that’s mostly why it’s better.

Yeah, cold for everything except whites (they get warm plus bleach). Else these days I do still try to separate them into dark and light colors. Jeans do still fade but it doesn’t transfer to the rest.
After switching to black socks years ago, I haven’t really had whites in a long time.
Once you go black, you don’t go back ( ͡° ͜ʖ ͡°)