When should I use .bashrc and when .profile? [duplicate]

I am basically putting all my settings into my .bashrc and when I was using zsh it was all in my .zshrc.

The Rust installer just informed me that it has added the new installation to my PATH by modifying .profile.

When should things go into ~/.profile?

Is it only doing that because it doesn’t know which shell I am using or should all somewhat general settings be in .profile?