Right now, the only known way to create gravity is with mass. To create Earth-like gravity, you would need a ball of mass as large as the Earth. The Earth doesn’t have the highest possible density, a neutron star or even a small black hole could create Earth-like gravity using a sphere of mass that is much smaller in diameter. Using the density of a neutron star, the sphere could be as small as 0.05 cubic kilometers. You could do a space station but a spacecraft is absurd, there isn’t enough propellant in the entire star system to move something that heavy into a new orbit.
Scientists recently proved the existence of the Higgs Boson, the sub-atomic particle that gives other particles their mass. Right now, there is not a single theory that says it could be possible to create gravity in only 1 dimension. To imitate the majority of science fiction universes, you would need to be able to create artificial gravity without making your ship so massive that it’s impossible to move and you would need a way to create gravity in only one direction. Most world-builders use that concept because it’s the most practical for set design not because it’s scientifically plausible. Theoretical physics is still in the process of unifying the theory of gravity and quantum mechanics, which explains electromagnetism, the strong and weak forces. It’s possible that there is a connection between gravity and the other three forces, that would allow for some technology to create gravity without mass. The current candidates for the Theory of Everything do not predict such a possibility, but they are incomplete and do not consistently and accurately describe reality as we observe it. If there is some mechanism a technology could take advantage of, it would have to be something we wouldn’t have stumbled upon by accident.
In my universe, the space stations spin to create artificial gravity, which is known as the centrifugal force. If the ring is large enough, the curvature of the floor isn’t a problem. In the picture above, you can see how the floor curves up on the horizon. It has two rings with a radius of 2.8 kilometers, spinning in opposite directions and orbits the Sun between Earth and Venus. One side is always facing the Sun and converts solar energy into electricity. There is also enough room to grow enough food in hydroponic farms to support the population. The following is a spreadsheet I created for calculating the specifications of space stations.