Aw, artificial gravity is simple; that’s why The Original Series had a saucer section: Concentric rings of decks could spin at proportional rates to make up a standard “gravity” force, which was really inertia.
Of course, The Next Generation folks were new-agey morons, rather than science-minded, and instead imagined the “saucer” section flat, and detachable from a mysteriously gravitational lower ship. The lower ship in The Original Series had been primarily zero-gravity propulsion.
And yes, that’s why “flying saucers” were first theorized in the 1940s: its a simple means of artificial gravity.
Deep Space 9 imagined a ring of developments spinning around a core. 2010 imagined two main compartments, spinning around a single core. Babylon 5 foreaw a rather conical spinning ship.
Good theory, but why didn’t cranking up the impulse drive, or jumping into warp, in TOS, plaster everyone against the back of the bridge? Really, all the Star Trek series could more accurately be called “space fantasy” than science fiction. They used very little real science, and of that they got most of it very wrong.