Hmm it's hard to say, and kind of depends the extremes on either side we're talking about lol.
Like if we're talking "Art is REALLY good and Story is REALLY bad" vs. the other way around, I think I'm team Art tbh. Comics can be downright difficult to read if the art is sloppy enough. Even if the story is terrible, if the art is nice I can at least enjoy it. The nice story I would prefer to read as a novel at a certain point.
That said like the level of bad art I'm talking about above is like... really awful. In the middle phases where the art is just okay and the story is really good, or the story is just okay and the art is really good- I flip to the story side. Heck I'd even consider a lot of the content I was making in late elementary school to early middle school to be at the level of art where you can at least tell what's going on, so it really doesn't take much for me. The biggest hurdle at that point is that a lot of authors in that range are just kind of so-so at both aspects so they're not appealing comics overall.
At a high level... well it's just important to have both down at that point I think lol. At this point either the story or art can be a hook and if the other is a suitable match stylistically and palatable, you're golden~