I think there's nothing wrong with basing your setting on the real world and based on science. Gravity based on mass, DNA, and so on.
It gives the players a solid basis from which to understand the setting. Although, depending on the players and how much meta the DM permits, this might be abusable (from a certain perspective). For example, a player might have their high intelligence character invent firearms. Depending on the campaign and group, this might or might not be a problem.
Equally, there's nothing wrong in having a setting based on something different. An idea I've toyed with is a setting where everything is based on essences. Gravity would be an effect of earth essence, for example. A tiny asteroid could have the same gravity as a planet, provided it contains sufficient earth essence. Dwarves would be stable not because of their low center of mass, but rather due to their higher than average earth essence. Massive creatures, like dragons, are capable of flight because their air essence is strong. With sufficient air essence, even a rock could float. Various potions could be created by distilling and combining these essences.
I think this approach can help the campaign feel more fantastical, although it may also be confusing for the players. The DM arguably has more control using this approach, since they constructed the rules. For example, firearms might be impossible or impractical to construct using essences.
With a fantasy setting, as long as your setting is internally consistent, the rules of the setting don't need to be based on RW science.