I was wondering if using trademarked items such as a bottle of "Pepsi", or a video game like "League of Legends" can make you vulnerable to lawsuits. I think so, but I am not sure, because I see a lot of media where products are often renamed into something similar like "Google" to "Poodle" and so on.
What you're talking about here is trademark law. "Pepsi", "League of Legends", etc, are trademarks. It's completely legal to refer to someone else's trademark, as long as you use it properly. But there are two big catches.
Number 1: You can't use someone else's trademark as your own. You can say, "George liked to play League of Legends". But you can't make up your own game and call it "League of Legends".
Number 2: You can't use a trademark as a generic term. For example, Coca Cola company's lawyers used to go after anyone who used the word "coke" with a small "c" as a generic word for "cola". They had a good legal reason to do this: The courts have ruled that if a company does not vigorously defend their trademarks from generic use, that they can lose their exclusive legal rights to the name. "Escalator" used to be a trademark, but the company failed to protect it, and the courts ruled that it was now a generic term for a moving staircase, not the property of any one company.
Number 3: If you refer to a trademark, you are clearly identifying who you are talking about. And if you say anything negative about them, they could sue you for libel. If you just wrote, say, "George Googled the word 'aardvark' and quickly found the information he needed", I can't imagine that Google would object. They're probably happy when lots of people talk about their company in a generic or positive way. But if you write a story about companies invading people's privacy by collecting personal information, and the chief villain in your story is an evil company named "Google", you might be hearing from Google's lawyers.
(Those are the issues I can think of, anyway. They're might be others.)
Unless you really need to refer to a real trademark for your story to make sense, it just avoids trouble to use made-up trademarks.
Like if you're making a TV show and the hero looks something up on the Internet, maybe in real life he's use Google, but it's easy enough to have the computer screen on the TV show say "Frugle". The audience will still understand what's happening and you avoid any potential problem.
In your case, if you want to say that the characters play a video game, does it HAVE to be "League of Legends"? Would it hurt the story if you said that they like to play "Hall of Heroes" or some such made-up name instead? If for your story to make sense the reader has to know some crucial fact about League of Legends, well I think that's just a bad idea. What if a reader has never played the game? I don't know what percentage of the world's population has played this particular game, but I'm guessing it's fairly small. (Personally I've never heard of it before reading this post.) So to make the story work you'd have to explain anything about this game that is relevant to the story. At which point you could use a made up game and explain the same things just as well.
Of course I don't know what you have in mind to write. It may be that there's some very good reason for naming this specific game.