I always search to find whether my question is a duplicate or not before asking the question on Stack Overflow. But often I cannot find anything (maybe this is a language problem) and I ask my question. Then someone finds a duplicate question of my question and votes to close mine. So how can I avoid asking a duplicate question?
The only way to really avoid asking duplicate questions is to find them. You might think "Yes Captain Obvious, that's what I'm asking. How do I find them?". In all honesty, that is not always easy. (Have a look through my questions here on Meta. There are a couple of dupes. Even though I looked) Especially if there is a language gap or you don't know the exact terms to search for, finding the dupe might be hard. Just do the best you can, but don't worry about the occasional duplicate.
Duplicates are not always such a bad thing. Sure, they should most likely be closed or merged, but as Martijn also indicated, they help other users with a similar phrasing as yours find the duplicate question. So in a sense, you're helping others.
And the more you hang around here, the easier it will be for you to find the duplicate. Especially if you're active here on Meta, or within a particular tag, you'll see questions come by of which you know they've been asked before. That knowledge will help you to find duplicates more easily, as happened in the case of your question here on Meta.
So do the best you can to find them. But if on occasion you don't manage to, don't worry too much about asking a duplicate question. If that doesn't happen for the majority of questions you ask, you'll be just fine.
This is OK, and also shouldn't be considered surprising. Remember it's not
The engine itself tries to offer something in between, something better than the asker alone, and it often works - many's the time when I have entered a question title and body just to get the automated possible-duplicate finder to find the dupe for me - after searching hasn't worked, of course. But there will always be times when we ourselves can't find it, but one of the thousands of other SO users can.