For me - nothing beats in-person classes in lieu of a native speaker whom you can interact with. Being forced to actually speak the language in “mock settings” makes all the difference.
And even if you don’t get your grammar completely right, you will learn enough to survive in a real-life setting.
I learned Spanish through a combination of both - I took Spanish classes after I started dating my Mexican wife, enough to get conversational. Then I started interacting in Spanish with her family, which helps me now maintain the language without needing the classes.