Choose whatever narrative you like best. Class features do not need narrative justification.
The D&D 5E system is mainly driven by rules and abstractions rather than narrative. Regardless of the narrative you use to explain how your character gained their class features, your character will gain those class features because the rules say they do.
Multiclassing into Rogue means you gain a 1st level Rogue's class features, plus proficiency with light armor, thieves' tools, and one extra skill. From the PHB section on multiclassing:
When you gain a new level in a class, you get its features for that level.
So by taking that level in Rogue, you can provide whatever narrative explanation you want. Maybe your character finds a book containing Thieves Cant terminology. Or maybe they've been studying it all along, and they weren't fluent until recently. Maybe they suddenly remember some past experience to explain their Expertise and Sneak Attack. The game assumes that any story will make sense. Your character gains these features because the D&D 5E rules say so.
D&D is designed to follow game mechanics rather than realism.
And trying to impose narrative realism into D&D is often unproductive when it clashes with those mechanics. Fantasy elements aside, class progressions often mean that characters gain new abilities in ways that may be inconsistent with the narrative.
Example: Wizards learn spells through study and research. After gaining sufficient combat XP, the Wizard gains a level and add two new spells to their spellbook. This is an abstraction. Even if they're in a dungeon, it is assumed that the Wizard found the time and resources to write those new spells. Why? Because that's what the system rules say. The DM could encourage the Wizard's player to provide some narrative for roleplay sake, but it should not be a requirement.
There is no "correct" explanation for how a character gets their class features. Some players may want to roleplay some ritual or process of gaining their new powers. Other players may prefer to ad-lib a brief explanation of how they got their abilities when nobody was looking. Other players may skip an explanation entirely.
The DM has the final say regarding what happens at the table and in their story. In theory, the DM could declare that a character doesn't gain their class features. But this selective realism so puts the player at a disadvantage, and would likely seem unfair. If your DM is trying to run a narrative-driven game, then it may help to discuss this with your DM outside of the game, and agree to a method and explanation for gaining your class features.