There is no one definitive answer to this question. However, there are some useful suggestions that can help you learn grammar more effectively.
One useful suggestion is to break down the task of learning grammar into smaller, more manageable pieces. For example, you could focus on learning the grammar of one particular verb tense at a time. Or, you could focus on learning the grammar of one particular type of sentence (e.g., declarative, interrogative, etc.).
Another useful suggestion is to find resources that focus specifically on grammar. For example, there are many excellent books, websites, and apps that can teach you grammar in an engaging and effective way.
Finally, it is important to remember that practice makes perfect. The more you use and apply the grammar rules you are learning, the more natural and effortless it will become.