sci fi : technology is important to the story, there is no magic, but the science isn't explored in depth or really align with what we understand of the universe. FTL, everyone looking human, everyone speaks English, everyone breaths oxygen, etc. Star Trek, Project Hail Mary, Gravity, Interstellar, The Matrix, Babylon 5, on and on.
hard sci fi: very rare, the science is based on our current understanding of physics and 1 thing may be exaggerated but thats it. It is very conscientious of following the exacting rules of the world it sets up and takes the time to work out the science. Extremely rare frankly - Primer, The Martian, 2001, Moon, Expanse, Contact, Blindsight. The Martian setup of martian dust storms is unrealistic but everything else is plausible from that one exaggeration. The Expanse imo also counts, "protomolecule" is exaggerated but everything else follows known science rules. The "one unrealistic thing" is important to let the story have an imaginative new angle. There are a few that take zero science liberties but its really rare. For example Apollo 13 is hard sci fi because its all real lol
space opera: science/tech is in the background but is more concerned with galactic drama, relationships, humanities place in the galaxy, etc and there might be magic. Star Wars, Dune, Riddick, Fifth Element, Guardians of the Galaxy, BSG, Foundation, etc.
you could easily have sub genres of all this stuff but i'd mostly categorize space stuff into one of those 3 buckets. hard sci fi is very debatable, i could see arguments for Martian not being hard sci fi (movie especially) but I think it counts.