What is the purpose of language? Communication.
If we do not follow accepted practice when using a foreign language, will native speakers understand us? Probably not.
So, your approach to learning English needs to be multi-pronged.
(1) Learn like a baby. Listen, 24/7.
(2) Learn like an educated native speaker who enjoys reading. Read, for hours every day.
Both (1) and (2) will improve your understanding and correct use of grammar. You might not even notice it happening, but you will absorb good practice by osmosis.
(3) Talk to native speakers. Frequently.
Notice that (3) includes an element of (1) so osmosis still applies. If you reflect back the language patterns you have just heard when you give your answers, the patterns will quickly become fixed in your brain, a part of your active repertoire.
(4) Study grammar.
If you have a teacher, you will probably learn about different points of grammar as they arise in conversation, or when the teacher feels that you are ready for the next step in developing your fluency.
If you do not have a teacher, work through the examples and explanations in your text books. Think about the grammar if it helps. In beginner level books, the grammar is not always obvious. Use the model sentences to draft sentences of your own, carefully following the patterns in the book. If in doubt, check. Say everything aloud. Writing and speaking, inventing multiple examples, will reinforce the “rules” in your head.
If you want a reliable grammar book, Murphy’s English Grammar in Use will guide you through the most important rules while giving you plenty of practice exercises. If it is too advanced or too basic for you, Cambridge English publishes guides suitable for various levels.
Remember this. The purpose of learning English is not to master a set of rules. The purpose of familiarising yourself with the patterns of the language, memorising them if necessary, but certainly practising them repeatedly, is, first and foremost, to help you to speak an English that native speakers will understand.
If you can learn to speak and write English in a way native speakers not only understand, but admire, you will be a shining star. You will be adding beauty to the world. So, play with the language. Experiment and create beauty in your own style. But do it within the parameters of acceptable English.
With or without a teacher, use guidance on “grammar rules” as a starting point. Make each new structure your own by inventing sentences, or devising speaking or writing opportunities where you can use these new structures.
“Use a word three times and it will be yours for life”
The same is true for sentence structures, use of tenses, and every aspect of grammar. Make English yours.