Well, 'System Shock 2' is a great one. It has a complex story set in a spaceship infested with mutants and other threats. The story unfolds as you explore the ship and interact with different elements. 'Prey' (2017) is also very good. You are on a space station filled with alien - like creatures and the story is about survival and uncovering the mystery of what has happened. It's very immersive.
One game that stands out is 'Dishonored'. It's an FPS with stealth elements, but the story is really what makes it special. You play as Corvo Attano, seeking revenge in a steampunk - inspired city. The choices you make in the game affect the story and the outcome. 'Dead Space' series also has a great story, set in a space horror environment where you face grotesque creatures while trying to figure out what's going on.