Way back in March, I rewatched the first season of Syfy's Invisible Man series from 2000-2001. The basic premise of the show is that a guy named Darien Fawkes gets busted during a robbery when the old man whose house he's robbing has a heart attack and he stays to give the guy CPR and save his life. As it's his third strike he's sentenced to life in prison. His brother is a genius scientist who works for a government agency and cuts a deal where if Darien puts a gland of "quicksilver" in his head, he can go free. The gland causes him to turn invisible and then Darien and the cut-rate "Agency" he works for take on various bad guys or X-Files type cases and whatnot.
It starts picking up around the fifth episode when Darien spies on the Keeper to find out why she's working such a shitty job and uncovers a woman with rapid aging the Keeper accidentally gave her in an Army experiment. With Darien's help the woman is saved and he and the Keeper have a better relationship and we even know her name: Clare. At the same time things with Darien and Hobbes are less acrimonious as they become more partners instead of Hobbes basically being a guard dog to make sure Darien doesn't go off the reservation. An episode or two later we even find out "the Official" is named Charlie--or at least that's the current name he's using.
And so by that point things are settling in and the show has better chemistry. Better chemistry makes it more fun to watch because the actors can play off each other better and banter a little more and stuff like that.
Of course this is not the only example. It took a while for there to be much chemistry in Star Trek Discovery. After the first two episodes that are essentially the pilot, Michael Burnham is a prisoner who like Darien Fawkes is freed by cutting a deal. Except for Tilly, her roommate, she's not really popular on the ship until she starts proving herself. Even then it takes a while (you might even say until the third season) to really get a lot of chemistry between the whole cast. In the same way it's because the main character starts as an outsider and those around her don't really like her.
You can fill in any other examples you might think of. Basically the point is that you have more chemistry with casts when they're friends than when they're enemies or rivals or or whatever. This is true for books as well as TV. If you have characters who are friendly with each other they'll have much better chemistry than if they're enemies or rivals.
One of those things that's probably obvious but if you're writing a story and characters don't seem to be clicking, maybe that's the problem.