If you have either a pre-made Anki deck with sentences for all the grammar, or a web page you can copy paste them from, or heaven forbid a Kindle or book that you can type them into Anki then blasting through grammar quick as you can as early as you can is _significantly_ faster than not doing so.
If you only did sentence mining then you would eventually learn all the grammar, you'll just do it slower, so the lead time on being able to parse the language will increase.
If you study grammar this way you don't have to sit and read dry explanations, but you can still more or less deduce how the grammar works.
If you also want to read the dry explanations too there's also nothing wrong with that.
In the case of Japanese there was a fantastic Anki deck called KO2001 which was 2000 sentences that covered lots of vocab and grammar with the idea that along the way it taught you how to read all of (jouyou) Kanji.
There was also an amazing deck called "A dictionary of Japanese grammar" which had 8000 sentences covering all of Japanese grammar.
I decided to take JLPT2 at the end of my first year of study. I spent the first 6 months doing RTK (remembering the kanji) all while doing immersion etc, so really I didn't know a heck of a lot after the first 6 months, but now reading and writing had become accessible to me. It was actually at this point I decided to take the JLPT2 and it was at the time I think only 4 months away.
That's a relatively insane goal and somewhat nonsensical thing to do, but I first blasted through KO2001 so I knew I'd be able to read everything on the test (more or less). Then I just absolutely hauled ass and took a list of grammar points needed for JLPT4, JLPT3, and JLPT2 and I had suspended all cards on the dictionary of Japanese grammar deck and simply unsuspended 3 or 4 sentences per grammar point.
I didn't pass the exam but I got 50%. I think you needed 60% to pass. I was stoked with that. I passed it 6 months later. 6 months after that took JLPT1 and failed getting again 50% where I needed 55% and passed it 6 months later with a decent score.
End of first year of study I could barely muddle my way through a basic "hello my name is..." type conversation. But I knew the entire grammar of the language and had around 2000 vocab.
2nd year of study I now switched to just vocab and tried to do 35 a day. All mined from immersing myself in native media. I learnt 10k vocab that year. I also started going to regular conversation clubs that year and moved to the city and brought in a Japanese flatmate. End of the second year I could speak very fluidly one on one for hours, but noisy group settings still gave me a little trouble.
End of 3rd year I was fluent. Noisy group settings, reading novels etc.
It was a wild ride actually. After I moved to the city I would just randomly approach people I could tell were Japanese and just started talking to them in Japanese. Half would freak out in a positive way, half would freak out like why is this guy talking to me. The uncomfortable ones I just disengaged soon as I could tell, but the positive reactions often ended in either me inviting them to a party I was having or them inviting me to a party they were having. Made a lot of friends. Best time of my life tbh.