I think both SW/ANH and ESB have cases to be made that they’re the best. It depends on what criteria you’re judging by. I don’t think ESB being “darker” or more of a character study automatically gives it a win any more than SW being the world builder or original means it’s better.
For me, SW’s biggest advantage from a filmmaking perspective is that it is perfectly paced. It is textbook setup and execution of plot, the result of which is an endlessly rewatchable film. It’s also just plain fun. It manages to, in a very short time, create characters that you really get attached to and really get invested in their fates. And, yes, it sets up an entire universe extremely different from our own with wild alien creatures and something mysterious called “the force” in a clear and natural way, so that it really feels like a living and breathing world. It really transports the audience to another world and captures its imagination like no film before or since ever has, and that right there is the key to its success. There is certainly something to be said for that.
Weak spots are typical for Lucas: Dialogue and acting. Though I think the missteps in both are highly overstated. It actually has a lot of great dialogue and acting, particularly from Ford, Guiness, and Cushing. But there are WTF moments as well (I’m looking at you, Leia’s weird English accent), though we’ve all come to love them of course.
ESB’s biggest advantage is that it raises the stakes in an extremely gripping way. It manages to avoid all the pitfalls sequels are typically prone to. It isn’t simply a repeat of the first film, it doesn’t feel tacked on or pointless. It genuinely feels like a natural, exponential continuation of the first film. It makes the characters and their motivations deeper and more human. We got to know and care about them in the first film, but now we really see them as fully fleshed (and flawed) people rather than simple caricatures or archetypes. Even (especially) the villain. It also throws the characters into challenging situations and, by extension, it challenges the audience. It’s not a simple story of good triumphing over evil this time. There are moments that will make you feel genuine doubt about the outcome and terror for the characters’ predicaments. And, yes, the twist ending was iconic on many levels.
Biggest flaw is that it still can’t overcome the inherent problem with being the middle film in a trilogy: There is no beginning or resolution. It doesn’t provide any sense of closure at all, ending on a cliffhanger. You have to watch the next film to get the whole story, and the first film to have any sense of what’s going on in the first place. It’s almost unfair to fault the film for this, as there is pretty much no way around it (though I will say that I think The Dark Knight managed to pull it off), but that doesn’t change the fact that it can’t work as a standalone film the way Star Wars can. I could sit down and watch SW over and over again, feeling completely satisfied from start to finish each time, but in order to watch ESB I’m going to have to commit to also watching the other two films in order to have context. I’m probably not just going to watch or rewatch it by itself. Also, compared to SW, the pacing drags a bit in some of the middle sections. Not much, but some. It feels like a longer movie despite being the same length.
Overall, which one I think is better depends on my mood. I will say that SW makes me a lot happier when I watch it, but ESB gives me a deeper sense of “damn this is good.”