Would you not be at least a bit annoyed if somebody told you to "just think positively" when you are drowning? To you it might sound ridiculous to make this analogy, as you don't see a person literally drowning when you see a depressed person. But to us it can feel exactly like this.
These situations are very, very hard to navigate if you didn't go through these issues yourself, so better just not give any advice and just try to listen.
I even had people tell me outright dangerous things, like telling me to stop taking medication. People who never had depression, had no contact with psychology except in high school told me this kind of advice. Even though I am certain some of the people who told me this wanted the best of me, quitting meds can have a wide array of unexpected effects, and even if the meds are not effective, this is still definitely a bad advice. Not to mention that meds actually helped me a lot.
If the advice isn’t to your liking, let it slide right off you. It will not make you feel better if you berate someone who’s ultimately trying to help you.