Grammar is indeed very important, especially in writing. Imagine that an English book or a passage is a cake, and grammar is like the ingredients and how the sentences are formed is the process of making it.
I understand that it can be very frustrating when it comes to grammar, however, there are many grammar practice resources out there that you can look for. Do a lot of practice! It can help you with your grammar! It isn't an easy task to master grammar, and trust me, it takes me a long time to actually understand it, much less having to teach it.
Last! Don't be afraid to make mistakes, and most importantly, learned from it! Cheers!