It's both. It's not llike PUBG couldn't have failed too, or Hollow Knight, like, by definition the reason people aren't buying games like this one is because they're already going for something else that caught their attention - ergo SOMETHING had to do it. Like even if you released the same game 2000 times with different names, one of them would catch on and the others wouldn't, it wouldn't mean that that one did something right that the others didn't. That's intentionally reductive to make my point, but it's still true even when the deck is already stacked against certain titles.
Being good doesn't guarantee success, and being bad doesn't guarantee failure. The fact that SOME indies have done very well, doesn't mean that those games were just better or more appealing, it just illustrates the compounding effect popularity brings to sales. Your game only has to be good 'enough' for that to happen, and most games probably are as long as they can tap into that initial wave (being online multi helps a lot with that of course, but undertale for example did just fine without that).