Surprise is a specific term; it happens at the start of combat
The "Surprise" section of the PHB covers this mechanic:
The DM determines who might be surprised. If neither side tries to be stealthy, they automatically notice each other. Otherwise, the DM compares the Dexterity (Stealth) checks of anyone hiding with the passive Wisdom (Perception) score of each creature on the opposing side. Any character or monster that doesn't notice a threat is surprised at the start of the encounter.
If you're surprised, you can't move or take an action on your first turn of the combat, and you can't take a reaction until that turn ends. A member of a group can be surprised even if the other members aren't.
When things such as Assassinate use the term "surprise" they do not mean just the standard English meaning of the word but the specific game term which is described by the above quote. Thus you only automatically crit if, at the start of the encounter, your target is surprised (unable to take actions etc...)
Explaining a small thing, the feature states:
[...] You have advantage on attack rolls against any creature that hasn’t taken a turn in the combat yet. In addition, any hit you score against a creature that is surprised is a critical hit.
This gives you two separate benefits:
- Advantage against creatures that haven't taken a turn.
- Hits become critical hits if your target is surprised (and a creature).