Okay so... it's a complicated thing, but in some contexts, seeing a brand, or somebody mentioning a person, character or brand name might count as "fair use" because it'd just be realistic.
That said, it's usually safer not to, and to use either generic words ie. "a cola" rather than "a coke" (cola isn't copyright. Cola is the generic term for all cola-like drinks including Coca-Cola/Coke, Pepsi, Karma Cola etc.) or to come up with a fake brand.
For characters it's a similar deal. If somebody said "I felt like Indiana Jones" in a novel, it'd probably be fine in most cases. That feels like it'd be fair use. Some people still avoid even this and would instead put stuff like: "I felt like an explorer from an old movie. I needed a whip and a fedora to complete the image." The book, Ready Player One couldn't possibly have been published if references to other media required a paid license for each one. It's constantly referencing specific characters from movies by name.
Another thing to remember is that public domain characters from works no longer in copyright are all completely safe. Dracula, Sherlock Holmes, Peter Rabbit, Frankenstein's Monster, Mister Darcy, King Arthur etc. They are all fair game.