Well, you are not alone, millions of language learners have had the same exact experience and feel hopeless when they actually have to learn a language as an adult. The good news is that the effects of this negative experience can be reversed, and you can indeed become fluent in a new language even as an adult.
Unfortunately, most schools in the US (though not exclusively there) consider language learning a “chore”, the curriculum and teaching approach are outdated, and the students’ opportunity to practice the new language outside of the classroom is close to zero. That is why most students barely learn to say their name, and they would certainly not feel comfortable using the new language in a real-life situation. And this is something that you can and need to change to be successful.
So what is the secret to learning a new language? How does the rest of the world do it where knowing another language is completely natural? There is not one good answer to these questions but you may find yours in this interesting article.