Playing with premades you know and trust is a good idea, but everyone has bad games. Make sure the people you play with in a premade have a history of being nice/non-toxic, and a history of not feeding/trolling/giving up at minute 5.
Honestly, it's unfortunate that this stuff happens. It's happened to probably everyone before. The thing is, if truly did bad that game, then they probably don't deserve to win the game anyways, it would only tell their brains that it's okay to make those mistakes because they'll win regardless. (which is a bad habit)
Of course, always try to carry as much as possible, build items that can directly help your team or hurt the enemy team, push towers with wards, then back away unharmed before they can gank you, etc.
Also, giving them some advice if you see something that you know a thing or two about is a good idea, but be careful. Even if what you say is 100% constructive, they could take offense. I usually only give advice to my team ingame if I 100% know what I'm talking about, because I don't want to sound like someone who thinks they know what they're talking, but doesn't. For example, I might give advice on something support or adc wise because those are my mains, but I probably wouldn't give advice dealing with a top laner, because I have minimum experience in that role.
TL;DR Be constructive, be friendly, and do your best. After all, if your best effort isn't enough to carry the game, at least you can walk away from the game knowing you tried your hardest and that you are not to blame. Also, be sociable, I've made awesome friends from simply saying positive things all-game before.