Every foreign language student commits the mistake of literal translation.
They first think of a sentence in their own native language and then translate it word for word.
The result is almost always wrong or awkward or strange.
Even professional translators may make that mistake because literal translation is the easiest and most natural answer that comes to mind.
How can you avoid that mistake?
By not thinking in your native language. You have to think directly in the foreign language. Of course this is very difficult and requires a very good vocabulary.
And since beginners don't have such an extensive vocabulary, they have no other option except literal translation.
But beginners need to be aware that literal translation is almost always wrong.
Direct translation of idioms, for example, will produce garbage in almost any language.
You have to ask yourself "how does a native speaker say this?".
You have to imitate the way native speakers say things.
If you don't know or can't remember how a native speaker say it, that is because your vocabulary is not good enough.
The problem then becomes how to improve vocabulary.
And the only answer I can think of is by reading as much as possible.
Listening and talking may not be enough, even though at some point you should be practicing conversation as much as possible.
Reading books, watching movies, listening to music, translating the subtitles, translating the lyrics, consulting the dictionary incessantly.
And then using the words and expressions you learned as often as possible.