according to the laws of westeros, women and bastards do not inherit, so dany would not have a better claim. i think the question is that according to the letter of the law, who would inherit robert now, since cersei, dany, jon snow and gendry are all disqualified?
The problem is in Westeros, partriarchal inheritance is the normal rule of law, but the perspective of the show is such that it discredits this system because in our world, it's clearly a load of sexist bullshit. However, it is conveniently not raising that question (yet) when it comes to Daenerys's claim to the throne being her 'right' because she is a Targaryen, despite it being part of the same system she is basing her legitimacy. On one page it says 'the crown passes down the family' and on another it says 'to the firstborn son'. So she's picking the part of the system that works for her and ignoring the part that doesn't, rather than doing the honest thing and basing her claim to the throne on her ability to be the best possible leader - which is a much more questionable position, because while she's inspired people to follow her through big, supposedly altruistic actions and also - really, mainly - the power of her dragons, we haven't actually seen her sustain a period of strong leadership that encouraged stability.
Really all she has is the power of her dragons, so she's making an existential threat to her opponents, and her bloodline, so she's appealing to the laws of a system she at the same time disavows and says she's going to 'break'. Off to a great start by saying you're the queen by right, rather than ability.
She's basically she's full of shit.
So is the show, for that matter, if she isn't confronted about this. They have characters we like say things about her having a good heart, being a kind ruler, etc, and that distracts people from the fact she's a huge hypocrite who abandoned her responsibilities as queen in Meereen already. It's a narrative dead end to just put her on the Iron throne and have everyone talk about how good she is, and beneath the show. She is different than the other bad rulers Westeros has had, she's definitely has nobler intentions, but it's all based on the same entitled horseshit and it shouldn't end well.