In Youtube I watched a video about 6 months ago that went in to a good amount of detail on two ways that gravity can be created in space. Each has its drawbacks as you would expect. I don't remember the name of it but you can find it with a search I'm sure.
Both methods are theoretically possible but there are huge engineering hurdles to get over to make it happen. @A_0123456 mentioned one of the ideas. If I remember correctly, the problem with that one is that to generate enough gravity the "circle" would have to be HUGE. And I think it had problems with docking to outside craft.
Do a search within Youtube for Artificial gravity in space.
Both methods are theoretically possible but there are huge engineering hurdles to get over to make it happen. @A_0123456 mentioned one of the ideas. If I remember correctly, the problem with that one is that to generate enough gravity the "circle" would have to be HUGE. And I think it had problems with docking to outside craft.
Do a search within Youtube for Artificial gravity in space.