It took me around 5-6 months in Germany to get to a level where I was confident in going up to someone and talking to them.
First two months I attended a language school. Four hours a day, five days a week. Living with other students from all around the world, of whom only a few spoke any English.
I joined the local mtb group and rode with them twice a week.
I first went to the South West corner of Bavaria to learn, so was dealing with a little spoken dialect, too.
I would now consider myself fluent, but still make mistakes. Der die das den dem des is one I’ll never understand. Or the endings of adjectives. But I understand 95% of what I hear and can get my point across.
Immersion really is the best way.
I’m “trying” to learn Italian, but only ever make any progress when I’m in Italy.