Can you write an error-free sentence? How about an error-free paragraph?
If you want to get a band 7 or higher for IELTS writing, the examiner needs to see that you "regularly write error-free sentences". This means that several of the sentences in your essays should contain no mistakes.
The best way to improve your grammatical accuracy is by learning from your mistakes. Try to find a teacher or native speaker who can check your work and highlight the errors. Then make sure you understand the mistakes you made, and try to avoid making them again. Aim to write more error-free sentences each time you write an essay.