There's three (sometimes four) cats that people put "sci fi" into:
Hard Sci Fi
Soft Sci Fi
Space Fantasy
And sometimes space Opera
I fundamentally disagree with the terms hard and soft because at the college I went to, being a "soft scientist" was derogatory, but "Hard Sci Fi" is more focused on the technical accuracy of the speculative science: The Martian, The Three Body Problem, etc. Soft Sci Fi is more focused on the social aspects for space and interaction: generational ship fiction, Star Trek, Apes, etc.
Space Fantasy and Space Opera are sometimes used interchangeably: Star Wars, Phantom of the Paradise, Barbarella